Skip to content Skip to sidebar Skip to footer

Convert Datetime To Milliseconds

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:s

Solution 1:

In javascript getTime() return the number of milliseconds since 1970/01/01.

This link is answer for your question DateTime to javascript date

Solution 2:

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?

Post a Comment for "Convert Datetime To Milliseconds"