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

String was not recognized as valid DateTime error

marco_paroti
Explorer
0 Likes
311

Hi all,

We would like to post notifications (IW23) via a PowerAutomate.
Unfortunately, this only works if the browser language is English.

For example, in German we get the following error message:
"error": {
"code": 500,
"message": "BadGateway",
"innerError": {
"status": 500,
"error": {
"message": "String was not recognized as a valid DateTime."

Connection: SAP OData
API: /sap/opu/odata/sap/api_maintnotification/
OData Entity Name: MaintenanceNotification
Method: POST
RequiredEndDate: 2025-12-25T00:00:00Z

We have tried the following date Formats:
2025-12-25 --> 400 BadRequest (CX_SY_CONVERSION_NO_DATE_TIME)
20251225 --> 400 BadRequest (CX_SY_CONVERSION_NO_DATE_TIME)
25.12.2025 --> 400 BadRequest (CX_SY_CONVERSION_NO_DATE_TIME)
25-12-2025 --> 400 BadRequest (CX_SY_CONVERSION_NO_DATE_TIME)
2025.12.25 --> 400 BadRequest (CX_SY_CONVERSION_NO_DATE_TIME)
2025-12-25T00:00:00Z --> BadGateway

The error CX_SY_CONVERSION_NO_DATE_TIME should come from /IWCOR/CL_DS_EDM_DATE_TIME====CM004. The date is expected here as follows --> ISO-8601 format:
FIND REGEX `^([[[:digit:]]{1,4})-([[:digit:]]{1,2})-([[:digit:]]{1,2})T(([[:digit:]]{1,2}):([[:digit:]]{1,2})(? ::([[:digit:]]{1,2})(\.[[:digit:]]{1,7})?)?$` "#EC NOTEXT
IN iv_timestamp
SUBMATCHES lv_year lv_month lv_day lv_hour lv_minute lv_second lv_fracs.

What is the problem here?
In which format must the date be transmitted?

Best regards,
Marco

marco_paroti_0-1753165942439.png

 

Accepted Solutions (0)

Answers (0)