Reputation: 45
My JSON date data is like below. how to convert to JS date?
"date":{"sec":1320919381,"usec":507000}}
is it ok?
new Date(obj["date"])
Upvotes: 1
Views: 607
Reputation: 112000
new Date(obj.date.sec * 1000); // pass milliseconds
Upvotes: 4