Comparing Dates in UTC

I'm attempting the following scenario in architect:

An inbound call comes in to the flow, a data action gets that lead from Dynamics CRM and returns "CreatedOn" date - which is in UTC.

If the CreatedOn date returned from Dynamics is equal to today (but not this exact time in UTC, just today's current date), I want to transfer the call to a queue.

If the Created on date returned from Dynamics is not equal to today i.e. yesterday, I want to do something else with the call.

Any suggestions on comparing my "CreatedOn" date from Dynamics with the current day from PureCloud?

1 Like

Hi Melissa,

Deciding if something was created "today" can be a bit tough when you are dealing with UTC, as daylight savings time can mess that up. If instead if you could check for "Was created in the past x hours" you should be able to do that pretty easily.

Something like a decision node that checks this:
DateTimeDiff(GetCurrentDateTimeUtc, createdon) < MakeDuration(0, x, 0, 0)

If "today" is a hard requirement then additional thought is going to be required :slight_smile:
--Jason

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