Easy way to determine if an hour has passed based on current time?

So we have a flow that saves the current time whenever a data action is triggered which is used to track when a certain email comes in. We want to find determine whether or not a hour has passed has passed if another email comes in for the same subject.

Any ideas what to use to help determine this? I know there are hours and minutes function but since the current time is tracked in UTC. Is there an easier method to determine whether an hour has passed based on the last time and current time? Don't think you can subtract UTC.

I would suggest that whatever system the data action is calling to store that timestamp be enhanced to be able to also provide the duration since the last time.

If you must do date math in Architect, it's possible, but can be a bit obtuse to work with depending on the details of what you're working with. Refer to the expression functions in Architect's help for additional information on each:

Hi Tim,

We just store it in the cloud data table but I will check out the other dunction. I'm just trying to see if there is an hour difference between the time when it was capture in the table and the current time another email that came that has the same subject.

You can compare times with the < or > expressions, you can also add (or remove) hours from a timestamp by doing addhours(flow.variablename, +1) to add one hour, or a addhours(flow.variablename, -1) to subtract an hour.

For this exact purpose, I would do something like:

  1. Get the info from the data table
  2. Do an 'addhours' function to subtract an hour from the table timestamp
  3. Perform a decision to see if 'new -1 time > current time'

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.