Wed, 07 Dec 2011 15:31:11 GMT
If I have that date object, how do I turn that into a unix timestamp (seconds since epoch)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use
which returns the UNIX Epoch time in milliseconds. You can leave ‘dateString’ empty to take the current time. However, when a Date object is cast to a number, it will also return the above. Thus
or
also works! See https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date for more information on the Javascript Date object.