Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Get Day of Week from Collection

    Posted 03-21-2022 09:58
    Hello,

    I built a collection of all the weekdays Sun-Sat


    I made an expression to pull the day of the week from the collection. I made an offset for time zone but I get back the wrong day. For example, I get back Tuesday but it is Monday. Below is my expression. Any help would be appreciated. Thanks. 

    #Architect/Routing
    #Architect
    #Architectureandtechnology
    #expression

    ​​​​
    #Ask Me Anything (AMA)
    #ArchitectureandDesign
    #Routing(ACD/IVR)

    ------------------------------
    Matthew Raleigh
    Contact Center Engineer L2
    Broker Solutions, Inc. DBA New American Funding
    ------------------------------


  • 2.  RE: Get Day of Week from Collection

    GENESYS
    Posted 03-21-2022 10:23
    Collections are 0-based; the 1st item is index 0, the 2nd item is index 1, etc.  DayOfWeek, on the other hands, returns values from 1 to 7.  So you need to subtract 1 from the day of week value.
    GetAt(Task.Coll1, DayOfWeek(AddHours(Flow.StartDateTimeUtc, -7))-1)



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



  • 3.  RE: Get Day of Week from Collection

    Posted 03-21-2022 10:33
    Thank you so much. Makes sense to me.

    ------------------------------
    Matthew Raleigh
    Contact Center Engineer L2
    Broker Solutions, Inc. DBA New American Funding
    ------------------------------



Need Help finding something?

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