cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to display data of date like /Date(1599782400000)/ in yyyymmdd in SAP Conversational AI

kazushioishi
Explorer
527

When connecting to OData API in S/4 HANA(API_COSTCENTER_SRV), the output data of date are displayed like /Date(1599782400000)/.

I would really appreciate if you tell me how to display the data in yyyymmdd, yyyy-mm-dd, or yyyy.mm.dd.

※The current output sentences are as follows:

管理領域は{{api_service_response.default.body.d.ControllingArea}}です。

会社コードは{{api_service_response.default.body.d.CompanyCode}}です。

有効期間は{{Date(api_service_response.default.body.d.ValidityStartDate)}}から{{api_service_response.default.body.d.ValidityEndDate}}までです。

原価センタは{{api_service_response.default.body.d.CostCenter}}です。

スクリーンショット-2020-12-16-142429.jpg

View Entire Topic
dtephan
Advisor
Advisor

Hi Kazushi,

kindly refer to the CAI documentation of the Scripting Syntax here https://help.sap.com/viewer/a4522a393d2b4643812b7caadfe90c18/latest/en-US/b4f08a9a66434327a405b69348...

Be aware, that only the input and output formats mentioned in the Dates section are supported.

Best regards,
Stephan

kazushioishi
Explorer
0 Kudos

Thanks Stephan for your answer.

Though I was not able to understand this page before I asked, I will read it again.

Best Regards,

Kazushi Oishi