Adding Time: Base time + 16 Hours


#1

I am stumped in how to add hours to a field.

I want to take “Start Time” and add 16 hours. Some example:

Start Time 06:00 result would be 22:00 or 10PM
Start Time 19:00 (7:00PM) result would be 11:00 AM

if I have 14:00 + 16 hours, the answer

Start Time is defined as a Duration - but maybe that is not right.

Thank you in advance to the incredible and generous community minds…


#2

I may have something but I needed to add a date, which is kind of logical since if we are the 22/04/18 16h30, when adding 16h, we would be the 23/04/18 8h30.

The {Start time} field is a date field (set on local) which include a time field (in 24h time format without the GMT time zone).

The formula I tried is this one :

DATEADD({Start time},16,'hours')

To which you can apply a formatting so it matches the date and time of the {Start time} field.

It the only thing I could think of, maybe someone with better Airtable skills than mine would do something else :wink:


#3

Thanks for the help, very much appreciated :slight_smile:

I have changed “Start Time” to Date and then inserted the formula DATEADD({Start time},16,‘hours’)
Here are the results:

Time

For some unknown reason its off by 2 hours. But it looks like it should work.


#4

I got it - my bad :frowning:

I didn’t check the box “use the same time zone for all collaborators”

With that checked - it works perfectly - you are a miracle work :slight_smile:

T2


#5

My bad too :roll_eyes: , I had the same problem when I was testing the formula :sweat_smile: and I forgot to mention it in my reply :sweat_smile:

But I’m glad to know it finally worked for you :slightly_smiling_face:


#6

I am not a coder, so when it comes to tweaks like these it becomes a challenge - I am just thankful for good people like yourself who jump into share.

I am all set now and have it operating as needed - many thanks again for the fast & very helpful support.


#7

You’re welcome :grin: :wink: !
I’m really glad it helped :grin:

(I’m no coder either, I’ve got notions of, but I’m learning how to write my own formulas so when I can help, I gladly do it :smile: )