Help

DATEADD functions adds days but also changes the time

Topic Labels: Dates & Timezones
3064 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Henry
4 - Data Explorer
4 - Data Explorer

I have 2 fields {Old Dates} and {New Dates}. I want to use a formula to increase {Old Dates} by 7 days and keep the same time.
{Old Dates}
7/16/2018 18:00
{New Dates}
7/23/2018 6:00pm

Unfortunately, when I use the formula function DATEADD({Old Dates},7,‘days’) the date is increased by 7 days but the time is reduced by 7 hours.
{Old Dates}
7/16/2018 18:00
{New Dates}
7/23/2018 11:00am

Does anyone else have this problem? How can I fix it? I’ve thought about increasing the date by 7 days and 7 hours. But that seems like a ducktape solution (which I’ll take if I need to). I also don’t know how to write the formula to increase a date by more than one time unit (days and hours, how do I do that?) Keeping the same date format would be nice too but I don’t Really need to do that currently.

1 Reply 1

Check your date formatting to make sure all your entered and calculated date fields are set either to use UTC or not use UTC. (I’m guessing you’re on Pacific Time, 7 hours offset from GMT.)

I’ve yet to figure out Airtable’s rules for which time it uses under different conditions. (I spent a couple of hours trying to track it down a while back, helping a friend troubleshoot a problem that had recently popped up, only to discover there must have been an error introduced in a recent upgrade, as sudden everything started working again.) At times, the only way I’ve been able to make sure the time stamp was what I expected has been to force it with SET_TIMEZONE() (which, to be fair, is probably how it’s supposed to work).