Sagitarius
Sagitarius

Reputation: 366

Equivalent in JavaScript to DateTime.Ticks

Is there anything in JavaScript similar to DateTime.Ticks in C#?

A single tick represents one hundred nanoseconds or one ten-millionth of a second.

(DateTime.Ticks on MSDN)

Upvotes: 1

Views: 3257

Answers (1)

Sagitarius
Sagitarius

Reputation: 366

I have found result, someone has already posted on "stackoverflow" year ago and it perfectly fits my solution

var result1=(date1.getTime()*10000)+621355968000000000; 
var result2=(date2.getTime()*10000)+621355968000000000;

Upvotes: 2

Related Questions