Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #time #date #iso #string #javascript
ADD COMMENT
Topic
Name
5+2 =