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.

If you need to do date math across timezones, follow this link to a couple date/timezone tools at the bottom of this page.

The known data:

Your computer's time:

-- the start of Unix Epoch Time
in your time zone ().

Convert a millisecond value to a date string

this (milli)second time number:

is the equivalent of this date string in time zone :

Date to milliseconds converter

a date string
"Mon Jun 18 2007 00:00:00 GMT-0400"
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:
"Mon Jun 18 2007 00:00:00 GMT-0400"
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:

Date and Time Math Across Timezones

Date and Time Plus/Minus Quantity of Time

This date and time
in timezone
so many
equals this date and time in this timezone :

Date/Time Subtraction

This date and time
in timezone
this date and time
in timezone
equals so many :

74 Responses to “Date to Millisecond Calculators”

  1. Anand Makwana

    Yeah , very useful

  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.

  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.

  4. Rickson


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


  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. :)

  6. tremendous calculator!do u sell it?i want to buy..

  7. shervin

    thank you for this unique service ! keep goin !

  8. Dijo

    Your website is my reference for scheduler running @ different locations etc … Thanks Man …

  9. Jegathesan

    Good utility site

  10. gUsCH

    Thank You!

  11. gUsCH

    I love this callculator.

  12. Jan

    Cannot calculate year 1000000 :( But don’t worry there is time.. ;)

  13. Kathy

    So useful, just what I was looking for! Brilliant! Thanks, Colin!

  14. Roger

    Section “Convert a millisecond value to a date string” is not working.

  15. Colin

    Hi Roger,

    I just tested it and it is working for me. I’ll look into the issue more if you can give me more info. Do you see javascript error in the console?


  16. Roger Li

    Moment Timezone 0.5.0 was already loaded with data from 2015g
    z @ moment-timezone.min.js:6

    Uncaught TypeError: Cannot read property ‘join’ of null

  17. Colin

    Hi Roger,

    thanks for your help. Can you please help me by answering a few more questions:
    What value are you putting into the (milli)second time number field?
    Which timezone are you in?
    Which timezone are you setting in the form?
    Do you have any adblockers turned on? If so, what are you blocking?


  18. Roger Li

    1# whatever.
    Please see the screenshot

    2# I am in HK (GMT+8).

    3# the time zone dropdown is not loading well.

    4# I hate adblocker.

  19. Colin

    Hi Roger,

    thanks for the info – very helpful. I think I’ve fixed the issue by updating to the latest versions of the moment.js scripts. These contain a fix that handles Timezone abbreviations specified in Chinese characters, which seems to be the case on computers set to the Hong Kong timezone on certain OSs.

    Please clear your browser cache and reload the page, and let me know how it goes.


  20. It is working great again now. Good job! Thanks!

  21. Colin

    Thank you for your help!
    I very much appreciate the chance to make it better.


  22. Alin

    Thank you very much. I am developer. I needed quick conversion and i come to this site. Much appreciated.

  23. Jean-Luc

    Bravo !


Leave a Reply