Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
41
rated 0 times [  43] [ 2]  / answers: 1 / hits: 18558  / 13 Years ago, wed, june 8, 2011, 12:00:00

I need to convert a date in yyyy-mm-dd like 2011-12-30 to UTC using only javascript. How?


More From » date

 Answers
36
var utc = new Date('2011-12-30').toUTCString();


jsFiddle.


[#91820] Monday, June 6, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristopherw

Total Points: 173
Total Questions: 107
Total Answers: 98

Location: Lesotho
Member since Wed, Jun 2, 2021
3 Years ago
;