# Re: Dateadd Formula date and hours

Solved
1162 1
cancel
Showing results for
Did you mean:  5 - Automation Enthusiast

Hello, I have two fields with two different formulas:

Field 1:DATEADD({Date morning Start},{Number of days},‘d’)

Field 2:

I would like to have only one field grouping these two formulas

Also, I have a third formula field but the formula doesn’t work on either the date or the time:
If({field date}, 09:00, ‘true’, ‘false’)

1 Solution

Accepted Solutions  11 - Venus
``````IF(DATETIME_FORMAT(DATEADD(Date, {Number of Days}, 'days'), 'LT') = '9:00 AM', 'True', 'False')
``````
8 Replies 8  11 - Venus

Hi @Franck_pasques
Are {Date morning Start} and {Date am Start} supposed to be the same field? Or is the name of field 1 {Date am Start}?

Your IF formula will not work as you have it. There are too many arguments in it. I think you meant to have IF({field date} = ‘09:00’, ‘true’, ‘false’) but i am not sure what type of field {field date} is.  5 - Automation Enthusiast

Hello Thank you for this feedback,
I am attaching a photo of the table

Field 1 - calculates the fields ;Date morning Start and number of days

Field 2 - calculates Date morning Start, + 4 hours

I would like fields 1 and 2 to combine the two formulas

On the field - Calculating Morning and AM copy the form does not work IF({Date morning Start} = ‘09:00’, ‘true’, ‘false’)

Thank you  11 - Venus

OK, here you go

Date AM Start

``````DATEADD(Date, {Number of Days}, 'days')
``````

Next

``````DATEADD(DATEADD(Date, {Number of Days}, 'days'),4,'hours')
``````

Get the time

``````DATETIME_FORMAT(DATEADD(DATEADD(Date, {Number of Days}, 'days'),4,'hours'), 'LT')
``````

Finally

``````IF(DATETIME_FORMAT(DATEADD(DATEADD(Date, {Number of Days}, 'days'),4,'hours'), 'LT') = "9:00 AM", 'True', 'False')
``````   5 - Automation Enthusiast

Great, thank you !
everything works :grinning: except grinning: true or false I attach the link to the table  11 - Venus

My apologies. I misread your post. In my formula the True false is looking at the “Just Time” field. You should be able to adjust it to pick up the Date am Start field. Do you want to give it a try? If you cant get it, I can fix it tomorrow.  5 - Automation Enthusiast

I tried but without success thank you for your help  11 - Venus
``````IF(DATETIME_FORMAT(DATEADD(Date, {Number of Days}, 'days'), 'LT') = '9:00 AM', 'True', 'False')
``````  5 - Automation Enthusiast

Cela fonctionne ! Merci beaucoup bien cordialement :grinning: 