Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Retrieve current date of the call as format dd-mm-yyyy on the Architect

    Posted 01-15-2019 11:51
    Hi,

    I search for an expression on the Architect that allows to retieve the current date of conversation and then convert it to the specific date format like: dd-mm-yyyy

    Please, any idea ?

    Thank you in advance
    #PlatformAdministration
    #SystemAdministration
    #Telephony
    #Unsure/Other


  • 2.  RE: Retrieve current date of the call as format dd-mm-yyyy on the Architect

    GENESYS
    Posted 01-15-2019 12:33
    There are 2 ways to get the time.  The GetCurrentDateTimeUtc() expression returns the current datetime in UTC.  Architect also has a built-in variable Flow.StartDateTimeUtc; this returns the datetime in UTC when the flow started.  The difference is Flow.StartDateTimeUtc is the same during the entire call, whereas GetCurrentDateTimeUtc() will change as the call continues.  You need to decide which value you want.

    The ToString expression can write out a datetime, but the format it uses is "yyyy-mm-ddThh:mm:ss.000Z".  Since that doesn't match the format you want, you will need to use the Day, Month, and Year expressions to write your own string value.  For this example I use a datetime variable Task.dateTimeVar, you will set it as either of the values in the paragraph above.
    Create a string variable Task.day with this value: 
    If(Day(Task.dateTimeVar) < 10, "0"+ToString(Day(Task.dateTimeVar)), ToString(Day(Task.dateTimeVar)))​
    Create a string variable Task.month with this value:
    If(Month(Task.dateTimeVar) < 10, "0"+ToString(Month(Task.dateTimeVar)), ToString(Month(Task.dateTimeVar)))​
    Create a string variable Task.year with this value:
    ToString(Year(Task.dateTimeVar))​
    Create a string variable Task.dateString with this value:
    Append(Task.day, "-", Task.month, "-", Task.year)​


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



  • 3.  RE: Retrieve current date of the call as format dd-mm-yyyy on the Architect

    Posted 01-15-2019 12:48
    Thank you Melissa, it is very explained

    Just one more question as you explain, what will be the value of the variable "Task.dateTimeVar", is it "GetCurrentDateTimeUtc() " ?

    Thank you again for your help

    ------------------------------
    Oudderhem Mostafa
    Coverage-Communication
    ------------------------------



  • 4.  RE: Retrieve current date of the call as format dd-mm-yyyy on the Architect

    GENESYS
    Posted 01-15-2019 12:56
    It's either Flow.StartDateTimeUtc or GetCurrentDateTimeUtc(), whichever value you choose to use.

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



  • 5.  RE: Retrieve current date of the call as format dd-mm-yyyy on the Architect

    Posted 01-15-2019 13:03
    Thank you so much Melissa, I really appreciate your help

    Have a good day

    ------------------------------
    Oudderhem Mostafa
    Coverage-Communication
    ------------------------------



Need Help finding something?

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