Hi geeks,
I’m trying to figure out how Adding a Value to a DateTime works.
Field is set to Display TIME : ie 00:00
Formula set is
StartTime +Number ( = EndTime)
00:00 + 60 = …12:34 (!!!)
… I would expect it to be 00:01:00 or 01:00:00
(unless its 00:00:00:060)
Does anyone knows why it is returning 12:34 and how one adds a 1 (Hour/min) value to a Time correctly ?
Thanks a lot
Just figured it out:
If you start calculating in a formula with a date/time you will get a decimal as a result:
.
This number represent the number of days since 01/01/1970.
That means today 6/18/2020 is 18431 days past 01/01/1970.
The decimal represent the fraction of time per day.
If you want to add 1 day you can just calculate
If you want to add minutes you have to use the fraction of 1/1440 for 1 minute
In the Custom Formula you can add minutes like this:
Where Input represents the number of minutes you want to add.
And don’t miss the brackets
Ma mamia Karimoo, where did you dig to uncover those secret formulas ?
Its the 1rst time i hear about this 1440 though I knew about the Epoch time reference.
This makes so much dif. now, Will test this right away…
Is this 1440 division related to the Epoch settings or that was another Coder’s creation ?
Very interesting !!!
Claping again with both hands and feet !
Hi @bibipac
What was your final formula to get the 24hrs time format out of the datetime? I am having some trouble with this right now. Can you share it?
I tried your formula but it’s not working for me. So, I have a form to schedule a meeting, where meetings are all 20 minutes long (to be integrated on Zapier). The starting date and time is a date picker for the user and the finishing time is currently an automatic field, being = “suggested time” + (20/1440) .