trvry
September 27, 2018, 5:37pm
1
Hello everyone,
I’m developing a fitness mobile app. I’m trying to store time values and do some operations on it. Like, add 20 secs or subtract 10 secs. Time should be displayed as mm:ss.s
The only data type available in Bubble database is “date”.
Any Idea how to deal with that?
1 Like
trvry
September 27, 2018, 5:50pm
2
@AliFarahat @levon @emmanuel
Any Idea how to deal with time form (mm:ss.s) in bubble database?
keith
September 27, 2018, 6:16pm
3
Dates ARE times. I’ve written a lot about this and you might want to read this post reply from me:
OK: A Quick Primer on Date Ranges
What is a date? You are probably familiar with the date data type. A date describes a unique point in time.
(Remember: Whenever we are talking about “dates”, we are actually talking about date/time objects. When we casually say “date” we should always remember that what we are saying is “a date/time”.)
A date represents some point in time. A date may be before some other date (in which case it is “in the past” with respect to some other date and would be “le…
Note that in addition to dates there are date ranges and date intervals in Bubble and these may be helpful to you. Consult the reference sections about those data types.
2 Likes
trvry
September 27, 2018, 6:48pm
4
@keith Thanks I’ll check it out.
The way I dealt with this in the past it to set it to the start of Unix time while changing the timezone to UTC 0
So change the day, month, year, hour, sec to 00:00:00 UTC on 1 January 1970
After that add your time in seconds. And format it to display only the hours, minutes and second
Make sure you stick to that timezone. If you display the date in another time zone then it will show wrong.
You can also try a decimal notation then.
Read this
2 Likes