Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
156
rated 0 times [  161] [ 5]  / answers: 1 / hits: 21517  / 13 Years ago, fri, june 3, 2011, 12:00:00

What is the best way to get a Javascript Date object from a string like the following one:



2011-06-02T09:34:29+02:00 ?


I have trouble with the time zone part (obviously).


More From » date

 Answers
6
var myDate = new Date('2011-06-02T09:34:29+02:00');
alert(myDate);

[#91879] Thursday, June 2, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marisela

Total Points: 103
Total Questions: 105
Total Answers: 102

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;