Hi There
I am using the Date\Time component in an Agent Script and i have assigned this to the variable strMoveDate
When i use the calendar function to choose a date the correct date is displayed on the screen
However when i try to use the same variable elsewhere it is converted into UTC time
I only want the date part of the string so I created another Dynamic variable that does that using this
substr({{strMoveDate}}, 0,10)
That works fine except that the because of the time difference (AEST( +10)) this can return the wrong date if I choose today and do so before 10 am
I have managed to get around this by creating another dynamic variable and using this expression
formatDate(dateToMilliseconds({{strMoveDate}}))
This returns the current date and time of the Agents Timezone
So using this new string i can then use the other string to give me just the date
So in affect this works but it feels like there is a better way in that if i can get the proper formatting of this formula then not only would it return the proper date and timezone it could do one better and return a proper formatted date like Monday 24-04-2023
I have no idea how this formula even works formatDate(dateToMilliseconds({{strMoveDate}})) but if i remove the dateToMilliseconds part then it doesnt work, is there some way of replacing the dateToMilliseconds part that would return me a date format instead
I got this formatDate(dateToMilliseconds({{strMoveDate}})) from a Genesys website but it doesnt expand on what other options can be used
Any help would be appreciated
Regards
Andrew