How to convert the date format to UT in JSON ?
How to convert the date format to UT in JSON? Utpal Vishwas 624 11 May 2023 How to convert the date format to UT in JSON?
To convert the date format to UT in JSON, you can use the following steps:
toUTCString()method to convert the date object to a string in UTC format.dateproperty of the JSON object to the string in UTC format.Here is an example of how to convert the date format to UT in JSON:
Code snippet
The
dateproperty of the JSON object will now contain the date in UTC format.Here is an example of how to print the JSON object:
Code snippet
This will print the following output:
Code snippet