Abhilash Nagar
asked on
Convert DateTime to Ticks Javascript or Jquery
Hello,
Can someone please suggest how to convert date like below to ticks
May 09 2019 23:59:59 to ticks in jquery or javascript?
Correct ticks conversion value should be :
636930431999990000
As per this link:
https://tickstodatetime.azurewebsites.net/
Thanks.
Can someone please suggest how to convert date like below to ticks
May 09 2019 23:59:59 to ticks in jquery or javascript?
Correct ticks conversion value should be :
636930431999990000
As per this link:
https://tickstodatetime.azurewebsites.net/
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the response. Yes your solution is correct but to match it exactly to .NET i did this :
((yourDateObject.getTime() * 10000) + 621355968000000000)-(yourD ateObject. getTimezon eOffset() * 600000000);
Below link :
https://stackoverflow.com/questions/7966559/how-to-convert-javascript-date-object-to-ticks
((yourDateObject.getTime()
Below link :
https://stackoverflow.com/questions/7966559/how-to-convert-javascript-date-object-to-ticks
Great - suggestion - next time mention you need a TimeZone offset and we will include it in the solution - but glad you are working.
ASKER
Thanks for all responses, great help!!
Open in new window