Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Formulas on automatic field

Topic Labels: Formulas
Solved
Jump to Solution
2484 6
cancel
Showing results for 
Search instead for 
Did you mean: 
Florence_Dorsil
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi there,

I just need a little help to finish my workflow !

I want to put a status from the automatic field “Last modified time”.

Formula is : IF(DATETIME_DIFF({Update URL}, TODAY(),‘days’) >= 13, “ :exclamation: ”, IF(DATETIME_DIFF({Update URL}, TODAY(),‘days’) >= 7, " :alarm_clock: ", IF(DATETIME_DIFF({Update URL}, TODAY(),‘days’) >= 1, “ :repeat: ”, IF(IS_SAME(TODAY(), {Update URL}), “New :rocket: ”)))))

It works pretty fine when the field is “date” but won’t work when field is modified in “Last modified time”.

Anyone can help please ?

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

I’ve not used the IS_SAME() function much, but checking the docs, you’re missing a third element: the unit of comparison:

IS_SAME([date1], [date2], [unit])

Similar to how you have “days” as a unit of comparison for DATETIME_DIFF(), try adding “day” as the unit of comparison for IS_SAME(). By omitting that unit string, there’s no way of knowing how it’s trying to compare those two dates: hour? day? month? second?

See Solution in Thread

6 Replies 6

Can you include a screen shot of the three fields?

Capture d’écran 2020-10-30 à 19.53.23

Capture d’écran 2020-10-30 à 19.54.44

It looks like the formula field does not recognize that it is the current date. It is possible that there is a time zone issue going on. Depending on your time zone the displayed date might not match the day of TODAY().

Are you up for a little test?

  • create a new formula field that simply shows TODAY() and set it to show the time and use GMT time.
  • set your ‘Last modified time’ to also show the time and use GMT time as well.
  • Send a new screen capture of the results.

Thanks a lot for your reply !
Here’s a screenshot. As you can see, both fields are set DD/MM/YYYY… :confused:

Capture d’écran 2020-10-30 à 22.24.21

Justin_Barrett
18 - Pluto
18 - Pluto

I’ve not used the IS_SAME() function much, but checking the docs, you’re missing a third element: the unit of comparison:

IS_SAME([date1], [date2], [unit])

Similar to how you have “days” as a unit of comparison for DATETIME_DIFF(), try adding “day” as the unit of comparison for IS_SAME(). By omitting that unit string, there’s no way of knowing how it’s trying to compare those two dates: hour? day? month? second?

Yeeah thank you very much !!

Capture d’écran 2020-10-31 à 06.39.31