Date to Millisecond Calculators

Several date to millisecond calculators, useful when coding countdown timers, cookie expiration settings or other date related scripts. The calculators are coded in JavaScript.

The known data:

Your computer's time:

equals
milliseconds
since
-- the start of Unix Epoch Time.

Convert a millisecond value to a date string

this (milli)second time number:

is the equivalent of this date string:

Date to milliseconds converter

a date string
examples:
"Mon Jun 18 2007 00:00:00 GMT-0400 (Eastern Daylight Time)"
or "09/23/2000"
or "09/23/2000 9:45:00"



What date would that be?

Your computer's time:


equals this date:

A temporal value converted to milliseconds


equals so many (milli)seconds:

Milliseconds converted to a temporal value

So many (milli)seconds:

equals so many :

How much time between now and then?

Your computer's time:

and this date:
examples:
"Mon Jun 18 2007 00:00:00 GMT-0400 (Eastern Daylight Time)"
or "09/23/2000"
or "09/23/2000 9:45:00"


are so many apart:

How much time between now and then (using a millisecond date value)?

Your computer's time:

and this date in (milli)seconds:

are so many apart:


57 Responses to “Date to Millisecond Calculators”

  1. Anand Makwana

    Yeah , very useful

    #78114
  2. ladposta

    Milliseconds to date string different than date to milliseconds for the same date:

    1392126870991 results in Tue Feb 11 2014 14:54:30 GMT+0100 (W. Europe Standard Time), while

    Tue Feb 11 2014 14:54:30 GMT+0100 (W. Europe Standard Time) gives 1392126870000.

    Is there a way to ensure that Tue Feb 11 2014 14:54:30 GMT+0100 (W. Europe Standard Time) gives also 1392126870991?

    Thanks in advance.

    #78144
  3. Colin

    Thanks for pointing this out. I guess there may be a bug in my code that converts Tue Feb 11 2014 14:54:30 GMT+0100 to milliseconds. might not respect the timezone portion.
    -Colin

    #79200
  4. Rickson

    Rudder,

    I have been developing an android app to know missing hours of employees. You don’t know how much I appreciate this page. Thanks!

    Rickson

    #80328
  5. @ladposta, @Colin there’s no mistake: milliseconds aren’t shown in this format: Tue Feb 11 2014 14:54:30.

    Both 1392126870991 and 1392126870000 represent the same second, but 1392126870000 is exactly 14:54:30:00, while 1392126870991 has 991 milliseconds more, not enough to make a second and appear in the timestamp. :)

    #83232
  6. shervin

    thank you for this unique service ! keep goin !

    #116262

Leave a Reply