Date-time converter

Convert date and time into various formats

Paste a date/time value, choose its input type, then copy formatted outputs instantly

Last updated: January 24, 2026
Frank Zhao - Creator
CreatorFrank Zhao

Formats

JS local date string
ISO 8601
ISO 9075
RFC 3339
RFC 7231
Unix timestamp
Timestamp
UTC format
Mongo ObjectID
Excel date/time

Introduction / overview

The Date-time converter takes one date/time value (in a selected input format) and outputs the same moment in multiple commonly used formats—ISO strings, RFC formats, Unix timestamps, Excel serials, and Mongo ObjectId timestamps.

A quick mental model: most date formats are just different “wrappers” around the same time point. The tricky part is timezone and units.

Who typically uses this?

  • Developers converting timestamps for APIs, logs, and databases.
  • Analysts cleaning spreadsheet dates (especially Excel serials).
  • Anyone debugging “my date is shifted by hours” timezone issues.

If you often work with IDs and tokens, you might also like our UUID generator, ULID generator, or Token generator.

How to use / quick start

1

Pick the input type

Choose what your input represents: ISO string, Unix timestamp, timestamp in milliseconds, Excel serial, or Mongo ObjectId.

2

Paste or type your value

The output table updates instantly. If the input is empty, the tool shows the current time, which is useful for quick “what does now look like in X format?” checks.

3

Copy the format you need

Use the copy button per row. This is handy when you need a strict string for an API, a number for a query, or a Mongo ObjectId placeholder.

4

Share or reset when you’re done

The page supports share links and a reset button. If your input contains sensitive information, avoid sharing links that include the input.

How to read the results

The table is a set of different representations of the same time. If you expect a timezone offset (like+08:00+08:00) and don’t see it, double-check whether you’re looking at a UTC format (RFC 7231) or a local/offset-aware format (ISO 8601).

Step-by-step examples

Example 1: Unix seconds → milliseconds timestamp

Imagine a log line contains Unix seconds ts=1769243570t_s = 1769243570. Many JavaScript APIs expect milliseconds, so you convert using:

tmst_{ms}==1000ts1000\,t_s==1000×17692435701000\times 1769243570==17692435700001769243570000

In the calculator: choose Unix timestamp as input type, paste 17692435701769243570, then copy the Timestamp row.

Example 2: Excel serial → date/time (conceptual)

Excel stores dates as “days since a reference date”. A simplified conversion uses a constant offset and a day length. The converter uses an Excel 1900 system approximation.

SerialSerial==tms86400000+25569\frac{t_{ms}}{86400000} + 25569

Practical tip: if a spreadsheet export gives you something like 46046.356146046.3561, selectExcel date/time, paste it, and the tool will show ISO/RFC/Unix equivalents so you can compare with your API.

Real-world examples / use cases

1) Debugging an API payload

Background: an API returns ISO timestamps and your UI shows the wrong time.

Input: paste an ISO value like 2026-01-24T16:32:50+08:002026\text{-}01\text{-}24T16:32:50+08:00.

Result: compare ISO, RFC 7231 (UTC), and Unix timestamp. If the UTC row differs by exactly your timezone offset, the parsing is probably correct and the display layer is the issue.

2) Extracting approximate time from a Mongo ObjectId

Background: you only have an ObjectId and want to estimate when it was created.

Input: paste the ObjectId. The converter reads the first 8 hex characters (timestamp portion) as seconds.

Result: you get UTC/RFC and Unix outputs. For generating placeholders, copy the “Mongo ObjectID” output.

3) Cleaning spreadsheet data

Background: exported CSV has Excel serial numbers mixed with real date strings.

Input: try “Excel date/time” first for numeric values; “ISO 9075” for values like 2026-01-24 09:15:002026\text{-}01\text{-}24\ 09:15:00.

Result: copy an ISO 8601 string and store it consistently in your database.

Common scenarios / when to use

Timezone offset checks

Compare ISO (with offset) against UTC formats to spot offset mistakes.

Copy exact output

Grab a strict string (RFC) or a number (Unix/timestamp) without manual formatting.

Database troubleshooting

Normalize incoming values (ObjectId/serials) into a single ISO format.

API contract validation

Ensure payload timestamps match what the backend expects (seconds vs milliseconds).

Spreadsheet imports

Convert Excel serials into ISO strings before storing them in a database.

Sanity checks

Quickly verify that two formats represent the same moment.

When this tool may not be appropriate:

  • When you need timezone-aware scheduling rules (DST policies, calendar recurrence).
  • When you need strict database conversions for historical timezone changes (this is a practical converter, not a full TZ database).

Tips & best practices

  • Always confirm units: Unix timestamps are seconds (s\mathrm{s}), while JavaScript timestamps are milliseconds (ms\mathrm{ms}).
  • If you see an offset shift, compare the “UTC format” row to the ISO 8601 row. The difference is often exactly your timezone offset.
  • For ObjectIds: the embedded timestamp is only to-the-second and reflects creation time, not update time.
  • If you’re storing or sharing values, prefer ISO 8601 because it’s readable and standardized.

A simple verification trick

Convert your value to a Unix timestamp, then convert back to ISO. If the second conversion matches the original (ignoring formatting differences), you’re probably safe.

Calculation method / formula explanation

Unix seconds and milliseconds

tms=1000tst_{ms} = 1000\,t_s

Here tst_s is Unix seconds and tmst_{ms} is milliseconds.

Excel serial (conceptual relationship)

Excel serials are “days since a base date”. A common relationship (using a 1900 system offset) is:

Serialtms86400000+25569Serial \approx \frac{t_{ms}}{86400000} + 25569

This is a practical conversion used for interoperability. If you need strict calendrical correctness across historical Excel edge cases, always verify with the original environment.

Mongo ObjectId timestamp (high level)

A Mongo ObjectId contains a timestamp prefix. Conceptually:

ObjectId time (seconds)\text{ObjectId time (seconds)}==parseInt(first 8 hex, 16)\text{parseInt(first 8 hex, 16)}

The converter then treats that as Unix seconds and outputs the corresponding date.

Related concepts / background info

UTC vs local time

UTC is a timezone reference that doesn’t change with daylight saving rules. Local time depends on your locale and may shift during DST transitions. When comparing systems, it’s often safest to store timestamps in UTC and only format for display at the edges.

ISO 8601 vs RFC formats

ISO 8601 is the most common structured format for modern APIs. RFC 7231 (HTTP date) is widely used in headers and is typically UTC. If you’re producing timestamps for an API contract, ISO 8601 is usually the best default.

Related utilities

For identifiers and compact sortable IDs, check out ULID generator and UUID generator. For quick hashing or encoding demos, Hash Text is a nice companion.

Frequently asked questions (FAQs)

Why is my time off by exactly a few hours?

That’s almost always a timezone issue. Compare ISO 8601 (with offset) against the UTC row. A consistent shift like88 hours often indicates local-time vs UTC confusion.

What’s the difference between Unix timestamp and Timestamp?

Unix timestamp is seconds since the Unix epoch. Timestamp (in JavaScript contexts) is often milliseconds. The relationship is tms=1000tst_{ms} = 1000\,t_s.

Can I convert “now” without typing anything?

Yes. If the input is empty, the tool displays the current time and updates live.

Does Mongo ObjectId give the exact creation time?

It encodes seconds-level timestamp information. It’s great for rough ordering and approximate creation time, but it doesn’t include milliseconds.

Why does an invalid input show an error message?

Some inputs are ambiguous (like date strings) and others are structurally constrained (like ObjectIds). The converter shows an error so you don’t accidentally copy a wrong value.

Limitations / disclaimers

What this tool is (and isn’t)

  • This is a practical converter for common formats, not a full timezone rule engine.
  • Excel serial conversions may vary depending on spreadsheet settings and historical edge cases.
  • Mongo ObjectId time is approximate and second-level only.

External references / sources