hi,
need Javascript equiv of php strtotime()..
thanks in advance...
hi,
need Javascript equiv of php strtotime()..
thanks in advance...
I don't believe browsers have anything like this built in, but there are some good libraries available.
You might check out Datejs.
I found this article and tried the tutorial. Basically, you can use the date constructor to parse a date, then write get the seconds from the getTime()
method
var d=new Date("October 13, 1975 11:13:00");
document.write(d.getTime() + " milliseconds since 1970/01/01");
Does this work?