cancel
Showing results for 
Search instead for 
Did you mean: 

DateTime constraint value not in the expected format: yyyy-MM-ddTHH:mm:ss or yyyy-MM-dd

kris_nguyen
Champ in-the-making
Champ in-the-making

I'm using the API query 'ApiServer/onbase/workview/v2/object-queries'. But when I attempt to query a datetime field with constraints:

{  "dataAddress": "53",  "value": "2023-04-28T11:55:19",  "operator": "LessThanEqual"}

I got an error from API server like that: 

 

{    "returnCode": "InvalidType",    "validationDetail": [        {            "dataAddress": "53",            "attributeName": "revisiondate",            "value": "04/28/2023 11:55:19",            "problemDescription": "DateTime constraint value not in the expected format: yyyy-MM-ddTHH:mm:ss or yyyy-MM-dd"        }    ],    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",    "title": "Validation Error",    "status": 400,    "detail": "Invalid Constraint Values"}

 

I recognize that API server can parse my input "2023-04-28T11:55:19" into "04/28/2023 11:55:19" but this value is not correct format in query. 

So, what should I solve this issue ? 

0 REPLIES 0