Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm pulling dates from a web service using JQuery and they look like this:

2013-05-20T23:59:59+01:00

Is there a quick way to convert this format to a UNIX timestamp using JQuery? So it looks like this:

1369090799
share|improve this question

1 Answer

up vote 1 down vote accepted

This is just plain JavaScript. No need of jQuery in this case. You can do

var date = '2013-05-20T23:59:59+01:00'
alert(Date.parse(date)/1000)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.