Can I convert iso date to milliseconds?
for example I want to convert this iso
2012-02-10T13:19:11+0000
to milliseconds.
Because I want to compare current date from the created date. And created date is an iso date.
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.
Try this
EDIT
You’ve provided an ISO date. It is also accepted by the constructor of the
DateobjectEdit
The best I’ve found is to get rid of the offset manually.
Seems working. As far as problems with converting ISO string into the
Dateobject you may refer to the links provided.EDIT
Fixed the bug with incorrect conversion to milliseconds according to Prasad19sara’s comment.