View Only
Discussion Thread View
  • 1.  Compare Dates in handler

    Posted 05-06-2022 08:22
    Hi All,

    I'm strugling a little bit with comparing Dates in handlers. The goal si to list all interactions in particular queue and evaluate interactions, which Eic_WorkgroupQueueTimestamp is less than defined date/Time. E.g. lower than x minutes or days. Review IDesigner help and there are a couple of functions for compring ones but not sure what date format to use. Based on attributes.pdf mentioned parameter has format:yyyymmddThhmmss.fffZ but what format should have comparing date?

    E.g. list all interactions which are older then 28 of february.

    What is best approach solve this task?

    Does anybody already solved it?

    Thanks for tips and help


    Pavel Broska
    Alcasys Slovakia a.s

  • 2.  RE: Compare Dates in handler
    Best Answer

    Posted 05-06-2022 10:22

    With a little preformatting of your string representation of the timestamp, you can load it as an actual datetime value with ToDT (UTC) or ToDTTZ (specify time zone).

    Creating Datetime Values

    You would just need to remove the "T" an the milliseconds to be able to load it as a datetime value.  You should be able to use StrPos and Substring to achieve this in a few steps:

    String Operators

    From there you can just use a basic condition to compare the two datetime values (<. <=, >, >=, ==)

    If you are not familiar with handlers, I can create a very basic handler that takes as input a string value like you have and a datetime value and return a boolean if the string date is < the passed in datetime and sharethat via github, just let me know.

    Aaron Lael
    State of Utah - comments on this forum reflect my own personal opinions\observations and are separate from any entity I am otherwise involved in.

  • 3.  RE: Compare Dates in handler

    Posted 05-11-2022 15:49
    Hi Aaron, thanks for tips ones helped me. Pavel

    Pavel Broska
    Alcasys Slovakia a.s

Need Help finding something?

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