i want convert a datetime variable in ASP.NET MVC to milliseconds,for example like to this:
'1288323623006'
which '1288323623006' in javascript with this format 'yyyy-MM-dd HH:mm:ss Z' means ' 2010-10-29 07:10:23 -3.530'.
i want convert a datetime variable in ASP.NET MVC to milliseconds,for example like to this:
'1288323623006'
which '1288323623006' in javascript with this format 'yyyy-MM-dd HH:mm:ss Z' means ' 2010-10-29 07:10:23 -3.530'.
In javascript getTime()
return the number of milliseconds since 1970/01/01.
This link is answer for your question DateTime to javascript date
var d = new Date(your date); then you can apply all the date functions on d this should help. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date
do you want to convert milliseconds to date or date to milliseconds?