Current date/time equal to

I’ve searched the current forum and I haven’t found my answer.

I want to trigger an email when the current date/time = date set by the user.

I see the options {<, >, -} but not “=”. Am I missing something?

Hi @brentparker76,
There are several ways to do this.

  1. Format both dates to the same format and compare the resulting strings
    e.g. Current User's setDate formatted as 20/12/17 is Current date/time:formatted as 20/12/17
    Note when you use formatted as the result is a string (text). So here you’re basically converting both dates to text and comparing the texts.

  2. Subtract the dates and if the result is 0 then they’re equal. Be mindful of the result if your dates have times.

  3. Extract the different components of the dates (year,month,day,minutes,seconds) and compare those components using :extract.
    e.g. User's setDate:extract year is Current date/time :extract hour and User's setDate:extract month is Current date/time :extract month and ...

  4. You could also simply compare their unix timestamp using the extract method just like above :extract UNIX timestamp(ms)

Depending on what your date/time entails pick the appropriate method.

4 Likes

Thanks for the tips. I’ll give them a shot a report back.

This topic was automatically closed after 70 days. New replies are no longer allowed.