You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
While adding rows in smartsheet, getting error like below {"code": 5536, "errorCode": 5536, "message": "The value "2021-07-19T11:09:15.985641" could not be saved in column "COLUMN_NAME". This column is restricted to DATE values only.", "name": "ApiError", "recommendation": "Do not retry without fixing the problem. ", "refId": "34we3p681175", "shouldRetry": false, "statusCode": 400}
In Smartsheet, there is on column od type "Date" and also has "restrict to dates" checkbox checked. It is requirement.
As per API doc, The Smartsheet API returns all dates and times in the UTC time zone in ISO-8601 format, that is, YYYY-MM-DDTHH:MM:SSZ. If you are specifying a date and time, you should also send that information in ISO-8601 format.
By using Python, I am sending date in ISO format only but still getting exception.
Python Code: datetime.now().isoformat()
Can anyone please help me in this case? Am I missing anything?
The text was updated successfully, but these errors were encountered:
Please try appending a 'Z' onto the end of your datetime.
Also ensure that you're using UTC time instead of local time. This can be accomplished using: datetime.utcnow().isoformat() or datetime.now(timezone.utc).isoformat()
Your code should look something like: f"{datetime.utcnow().isoformat()}Z"
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While adding rows in smartsheet, getting error like below
{"code": 5536, "errorCode": 5536, "message": "The value "2021-07-19T11:09:15.985641" could not be saved in column "COLUMN_NAME". This column is restricted to DATE values only.", "name": "ApiError", "recommendation": "Do not retry without fixing the problem. ", "refId": "34we3p681175", "shouldRetry": false, "statusCode": 400}
In Smartsheet, there is on column od type "Date" and also has "restrict to dates" checkbox checked. It is requirement.
As per API doc,
The Smartsheet API returns all dates and times in the UTC time zone in ISO-8601 format, that is, YYYY-MM-DDTHH:MM:SSZ. If you are specifying a date and time, you should also send that information in ISO-8601 format.
By using Python, I am sending date in ISO format only but still getting exception.
Python Code: datetime.now().isoformat()
Can anyone please help me in this case? Am I missing anything?
The text was updated successfully, but these errors were encountered: