Shard Tools

Date to Unix Timestamp

Convert a date and time to a Unix timestamp in your browser.

Maintained by Roshan.

Use Date to Unix Timestamp

Converts date and time to unix timestamp in this tab, with nothing sent anywhere.

Runs entirely on your deviceThe conversion happens in this browser tab. Nothing you type is uploaded, logged or stored, which is worth knowing for anything you would not paste into a search box.

Explore general converters

Find related browser-local tools for nearby tasks without starting another search.

Browse all general converters

About Date to Unix Timestamp

Turning a date into a Unix timestamp is the reverse task, and it is what you do when a human-readable moment needs to go into a system that stores time as a number: setting an expiry, querying a database by a date range, or filling in a field that expects epoch seconds. A timestamp is a single count of seconds since 1970, which is why software prefers it - two timestamps can be compared and subtracted with plain arithmetic, where two formatted dates cannot. This tool reads a date written in the common forms - a plain date, or a date with a time - interprets it, and returns the timestamp in seconds. Because the interpretation of a date without an explicit timezone depends on context, being aware of how yours is read is worth a moment's thought.

Using Date to Unix Timestamp

  1. The date is read from the common written forms, including a bare date and a date with a time of day.
  2. It is converted to the number of seconds since the start of 1970, which is the Unix timestamp.
  3. The output is in seconds, the most widely used scale, ready to store or compare.
  4. An input that cannot be read as a date is refused with a message showing the expected forms.
  5. The result is a single number that other systems can compare and do arithmetic on directly.

Where date to unix timestamp helps

Setting an expiry field

A human date converts to the epoch seconds a token or record expects for its expiry.

Querying by date

Convert the start and end dates to timestamps to filter records stored as epoch time.

Before you use the result

Questions about Date to Unix Timestamp

Is the result in seconds or milliseconds?

Seconds, the most common scale. Multiply by a thousand if your system wants milliseconds.

How is a date without a timezone read?

In a default interpretation. For certainty, include an explicit timezone or write the date in UTC.

What date formats work?

Common ones - a plain date like 2024-03-17, or a date with a time. An unambiguous format avoids day-month confusion.

Can I include a time of day?

Yes. A date with a time converts to the timestamp of that exact moment.

Related tools

Unix Timestamp to Date

Convert a Unix timestamp to a readable UTC date in your browser, handling seconds and milliseconds.

Decimal to Hex

Convert a decimal number to hexadecimal in your browser, with full precision for large values.

Hex to Decimal

Convert a hexadecimal number to decimal in your browser, with full precision for large values.