DATEADD() expression

Greg_L
New Member

I would love to see AppSheet create a DATEADD() expression that allows you to easily add (or subtract) time in different types of units (minutes, days, hours, months, etc…)

It would look like this: DATEADD([date], [#], ‘units’)

So… DATEADD(TODAY(), 10, ‘days’) returns a date that is 10 days after today.

See the way it is used over at Airtable: https://support.airtable.com/hc/en-us/articles/203255215-Formula-field-reference#date_and_time_funct...

Status Open
7 11 2,097
11 Comments
Kirk_Masden
Gold 1
Gold 1

I have found working with dates and times to be difficult so anything that makes it easier sounds like a good idea to me. The example you gave, that is, adding days, is currently the easiest one. Adding hours and minutes is harder, though, of course, it can be done:

Steve
Platinum 4
Platinum 4

Add 10 minutes: TIMENOW() + "000:10:00". Good for any number of minutes less than 60.

Add 10 seconds: TIMENOW() + "000:00:10". Good for any number of seconds less than 60.

Not great, but it’s something…

AndreSpeek
New Member

If it is something and it works, than it is great to me…

Mike_T
New Member

How do you add 14.5 hours to DateTime?

Mike_T
New Member

OK…i figured out how to add it. [DateTime]+“014:30:00”.

So now how do I evaluate just the time portion of the [DateTime].

What I want: IF(time of [DateTime] = 6pm, [DateTime]+“014:30:00”, [DateTime]+“07:30:00”)

Thoughts?

Bahbus
New Member

TIME([DateTime)

Marc_Dillon
Platinum 1
Platinum 1
LeventK
Silver 5
Silver 5

@Mike_T

IF(
	TIME([DateTime]) = "18:00:00",
	[DateTime] + "014:30:00",
	[DateTime] + "007:30:00"
)
Mike_T
New Member

Why do you have to make it look so simple!

Thank you! I promise to only post really hard requests from now on!

LeventK
Silver 5
Silver 5

Because it’s simple

Challenge accepted @Mike_T

Status changed to: Open
Pratyusha
Community Manager
Community Manager