cancel
Showing results for 
Search instead for 
Did you mean: 

formatDate pattern

09-21-2020 5:16 PM
462 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hi colleagues,

From the chatbot, I need to pass the message timestamp to the client's service. The timestamp has the following format: 2020-09-21T15:03:31.018582+00:00

The format the client expects is 2020-09-21T10:04:14.702Z or \/Date(1600682606267)\/.

I have tried to use the formatDate with the patterns as specified at the Dates section from https://help.sap.com/doc/9b639cad3d734675971ab22ed10bbf28/latest/en-US/UserGuideToConceptsOfSAPConve... but I didn't suceed to get one of the formats the client expects.

Is it possible to format the timestamp like this?

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

AntonR
Product and Topic Expert
Product and Topic Expert

Hi Alexandra,

this output date format is unfortunately not supported. You could find all currently supported output date formats in the documentation of the scripting syntax in the section dates over here.

A workaround which would possible, is to format the your date "2020-09-21T15:03:31.018582+00:00" into "2020-09-21T15:03:31". I can assume that the client service may interpret it as "2020-09-21T10:04:14.000Z", but it will always end up in UTC timezone.

Sorry for the inconvenience and best regards,

Anton