Answers for "set to iso format and utc js"

2

how to get time and date from iso string javascript

const myDate = "2012-10-16T11:00:28.556094Z";
const time = new Date(myDate).toLocaleTimeString('en',
                 { timeStyle: 'short', hour12: false, timeZone: 'UTC' });

// Output:  "11:00"
Posted by: Guest on January-04-2021
0

convert iso 8601 to utc javascript

//Convert iso 8601 to utc javascript

var d = new Date("2016-07-02T19:27:28.000+0000");
console.log(d.toLocaleTimeString());
console.log(d.toTimeString());
Posted by: Guest on July-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language