Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Time Calculation

    Posted 05-31-2022 03:56
    Hi all,

    In Architect, I'm looking for a easy way to get a specific time which can be dynamic ( ex :16H00,16H01) minus a amount time always fixed (ex :15 minutes), for example if the call arrives at 16H, the hour limit is 15H45.
    I have converted the specfic time (ex : 16H45) to integer (164500 retrieve the number of minutes (4500) and makes some condition for check if the number of minute (4500) minus 1500 (15 mn) is >0 or <0 and makes change regarding the number of hours.
    Is there another better way to get this result?

    thanks
    Jérémy
    #ArchitectureandDesign
    #Implementation
    #Unsure/Other

    ------------------------------
    Jeremy
    ------------------------------


  • 2.  RE: Time Calculation

    Posted 06-03-2022 07:37
    Hi Jeremy,

    I usually work with DateTime/Duration data types to make calculations.

    The only problem with time in Architect is that all the info is UTC. You might need to convert it to your local time first.

    Have a look at the DateTimeDiff function in the expression helper.




  • 3.  RE: Time Calculation

    Posted 06-03-2022 09:55
    Hi Paul,

    thanks for your feedback!

    But, this formula complicates my use case because the formula compare 2 dates.
    In my case,  the specific time is retrieved from a variable coded on 6 caracters (Ex : 160000 for 16H)
    so I have to translate in date format , and translate the call time in date format for compare both. 

    Jeremy








    ------------------------------
    Jeremy
    ------------------------------



  • 4.  RE: Time Calculation
    Best Answer

    Posted 06-20-2022 08:03
    Hi all,

    The best ways seems to use the formula AddMinutes which enables (contrary to what its name suggests)  to soustract amount of time from a  specific Datetime variable.

    thanks
    jeremy

    ------------------------------
    Jeremy
    ------------------------------



Need Help finding something?

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