Apr 12, 2020 05:36 AM
Hi Airtable community,
This is my first time using Airtable, so sorry if this is simple!
I am trying to set a ‘finish time’ by taking the booking date & time and adding the ‘duration’ too it which is coming from a lookup from another table.
Naturally the ‘End time’ should be “22:30” and “22:57”, yet all it’s doing is mirroring the start time.
I have tried the Dateadd function which I found in someone else’s post (see code below) but haven’t been able to get it working.
Am I missing something?
Thanks in advance!
DATEADD({Booking Date & Time}, Duration, 'hours')
Thanks in advance for posting your question! When someone provides an answer, remember to mark their reply as the :white_check_mark: solution.
Apr 12, 2020 07:50 AM
Hi @Frazer_McLeod,
I think you have a formatting issue. Make sure the duration is seen as hours in the Duration field.
BR,
Mo
Apr 12, 2020 02:30 PM
Hey @mohamed_swellam, thanks for your quick reply.
The duration is set to h:mm in both the table and the lookup field. Any other ideas?
Thanks
Apr 13, 2020 02:41 AM
Hi @Frazer_McLeod,
It appears that the correct formula is DATEADD(Date, Duration, 'seconds')
as the duration field outputs its data in seconds to any formula.