How to solve the “Assign: The string was not recognized as a valid DateTime.” Error.
I am reading a date time from a json in this format
Date “:“2021-08-31T00:00:00.000Z”
But when i add it in write line like “Date”+date, the output is displayed as 208/31/2021 00:00:00”
How can i solve this error? and how can i knwo which is the correct format.
Please help!
What are you trying to do ? I.e. reading this value and planning to convert it to different format?? if so what is the output format you wanted to covert??
Datetimes don’t have a format. “MM/dd/yyyy” is a string format. What you want to do is use Parse to convert the string “2021-08-31T00:00:00.000Z” into a Datetime, so you can compare it with other datetimes.