Current Datetime String — SQL, ISO 8601 and Unix Timestamp
This page shows the current datetime string in the five shapes developers paste most: a SQL datetime, ISO 8601, a Unix timestamp in seconds, a Unix timestamp in milliseconds and a plain date. Tap a card and the value is copied. Everything is computed in your browser; nothing is uploaded.
How to copy the current date and time as a string
- Set Timezone to Local time or UTC.
- Tap the card you need. A Copied! toast confirms it.
- Paste it into your query, script, log or spreadsheet.
The clock ticks every second. After a copy it pauses for 3 seconds so the value you pasted stays on screen, and the header label reads Live clock, Paused or Custom time to tell you which mode you are in.
The five formats
| Card | Shape | Typical use |
|---|---|---|
| SQL datetime | 2026-10-20 14:03:05 | MySQL, SQL Server and Postgres DATETIME or TIMESTAMP values |
| ISO 8601 | 2026-10-20T14:03:05.123+09:00 | JSON, APIs and logs; ends in Z in UTC |
| Unix timestamp (seconds) | 1792472585 | Epoch seconds for scripts, cron and databases |
| Unix timestamp (milliseconds) | 1792472585123 | JavaScript Date.now() |
| Date only | 2026-10-20 | Date columns and file names |
Local time or UTC
Local time uses your device's timezone, and the ISO 8601 string carries its offset. UTC gives the same instant in universal time. The two Unix timestamps never change between the two, because they count from a fixed UTC moment.
Format a specific date and time
Turn on Custom time to pick any date and time, down to the second. The value is read as wall-clock time in the timezone you selected, and all five cards then format that moment instead of the live clock.
Frequently asked questions
What is the current Unix timestamp, in seconds or milliseconds?
The Unix timestamp (seconds) card shows the number of whole seconds since 1 January 1970 UTC, and the Unix timestamp (milliseconds) card shows the same moment in milliseconds, the value JavaScript's Date.now() returns. Tap either card to copy it.
How do I get the current datetime string in SQL format?
Tap the SQL datetime card. It copies the time as YYYY-MM-DD HH:MM:SS, for example 2026-10-20 14:03:05, which MySQL, SQL Server and Postgres accept for DATETIME and TIMESTAMP columns.
What does the current date and time look like in ISO 8601?
The ISO 8601 card gives a date, a T, the time with milliseconds and a timezone offset, such as 2026-10-20T14:03:05.123+09:00. Switch Timezone to UTC and it ends in Z instead of an offset.
Is a Unix timestamp the same in every timezone?
Yes. A Unix timestamp counts seconds from a fixed UTC moment, so changing Timezone between Local time and UTC changes the SQL datetime, ISO 8601 and Date only strings but never the two Unix timestamps.
Can I format a date and time other than now?
Yes. Turn on the Custom time switch and pick a date and time down to the second. It is read as wall-clock time in the selected timezone, and all five cards format that moment instead of the live clock.
Recommended
-
Amazon Basics Aluminum Laptop StandRaise your screen for long coding sessions
-
Learning SQL (O'Reilly)Get your datetime inserts right the first time
-
BenQ ScreenBar Pro Monitor LightLate-night log digging without the glare
Helps keep the tools free. ✨
Images are for illustration only. As an Amazon Associate I earn from qualifying purchases.