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
If I use a formatter like this "yyyy-MM-dd HH:mm:ss.SSS" the milliseconds section (SSS) is not properly formatted.
Example:
var outputDatestring = "2015-03-25T13:43:00.123+0000";
var date = new Date(outputDatestring);
console.log($.format.date(date, "yyyy-MM-dd HH:mm:ss.SSS"));
This code logs the following result (my browser is in GTM+01:00, so the hour is correct, but not the milliseconds section): 2015-03-25 14:43:00. Eu
Expected result: 2015-03-25 14:43:00.123
The text was updated successfully, but these errors were encountered:
Hi,
That format is called ISO 8601, which is one of the most common formats used for serialization/deserialization of Date objects as a string in JSON format.
There is also another common ISO 8601 format: "2015-03-25T13:43:00.123Z"
...which is what javascript outputs with toISOString()
new Date().toISOString()
"2020-03-25T19:21:42.398Z"
If I use a formatter like this "yyyy-MM-dd HH:mm:ss.SSS" the milliseconds section (SSS) is not properly formatted.
Example:
This code logs the following result (my browser is in GTM+01:00, so the hour is correct, but not the milliseconds section):
2015-03-25 14:43:00. Eu
Expected result:
2015-03-25 14:43:00.123
The text was updated successfully, but these errors were encountered: