Help : StarTIME +60 = funny Endtime 🤔

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 :open_mouth:
StartTime +Number ( = EndTime)
00:00 + 60 = …12:34 (!!!) :thinking:

magic time

… 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

1 Like

:open_mouth:

Good question! :blush:

1 Like

Just figured it out:
If you start calculating in a formula with a date/time you will get a decimal as a result:
image.

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
image
If you want to add minutes you have to use the fraction of 1/1440 for 1 minute
image
In the Custom Formula you can add minutes like this:
image
Where Input represents the number of minutes you want to add.
And don’t miss the brackets :slight_smile:

6 Likes

Ma mamia Karimoo, where did you dig to uncover those secret formulas ? :smile:
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 ! :smile: :clap: :clap:
:100:

1 Like

Confirming ! Karimoo your formula just solved it !
Thanks again, great method !correct time calc
Itchiban :ok_hand:

@karimoo Thanks a lot, It’s saved my time :star_struck:

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?

Thanks!

how do you get the fraction or decimal to return a date?

1 Like

Hi,

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) .

When I fill the forms, there is no finishing time being recorded. What am I doing wrong here?

Thanks in advance

Hi,
Which format is the “Contact request suggested time”?
If this is what you are working on, you can copy my template The one with Date calculation

Brilliant