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 Current Millis:

Your computer's time:

equals
milliseconds
since
-- 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 in time zone:

to this date string:

Date to milliseconds converter
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:
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
in timezone
so many
equals this date and time in this timezone
Date/Time Subtraction
in timezone
minus
in timezone
equals so many

86 Comments

  1. 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

  2. @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. 🙂

    • 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?

      -Colin

  3. 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
    yyrOyUzSz83PTc0r0S3JzE2tys9L1S3PLMnQTUksSQQA.js:18

    • 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?

      Thanks!
      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.

      Thanks!!
      Colin

    • Hi Lee,
      If your phone is set incorrectly to a future date, as it appears to be from the image name: IMG_20181009_091252 (October 9 2018 or September 10 2018), and your phone created the picture, you may not be able to get the real original date.
      If the image name was created by some other device than the one that most recently named the file, you may be able to search through the image file’s EXIF data to see if it has a ‘date’ value. Here is a list of EXIF readers to consider for this task: http://carlcheo.com/best-exif-viewers

  4. Thank you so much for building this! I’ve probably used this site over 100 times and its simply the best time calculator I’ve found anywhere. Real nice stuff!

Leave a Reply

Your email address will not be published. Required fields are marked *