Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  Convert Date/Time to UNIX

    Posted 08-10-2022 10:43
    Hello,

    I'm retrieving a date in UNIX from a data action and need to perform a function of TODAY - UNIX date to use in a decision. I can either convert the UNIX timestamp to UTC or convert the UTC timestamp to UNIX. Are either of those possible within Architect? I'd prefer to convert the date/timeUTC that's passed in the GetCurrentDateTimeUtc() variable but I'm open to other ideas.

    Thanks,
    #Routing(ACD/IVR)

    ------------------------------
    MAURICE FORD
    ------------------------------


  • 2.  RE: Convert Date/Time to UNIX

    GENESYS
    Posted 08-10-2022 11:01
    ToInt(DateTimeDiff(GetCurrentDateTimeUtc(), MakeDateTime(1970, 1, 1)))​

    DateTimeDiff gets the difference between the 2 dates as a duration, ToInt converts a duration to the number of milliseconds in it.



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources