📅 Date to Unix Timestamp Converter

Convert dates to Unix timestamps instantly

🔍 Convert Date to Unix Timestamp

Select a date and time to convert

⏰ Current Time
📅 Today (00:00)
➡️ Tomorrow
⬅️ Yesterday
Unix Timestamp (Seconds)
Unix Timestamp (Milliseconds)
ISO 8601 Format

How to Convert Date to Unix Timestamp

Converting a date to Unix timestamp is simple: select the date and time, then click Convert. Our tool generates both seconds (10 digits) and milliseconds (13 digits) formats, which you can use in any programming language or database.

Unix timestamps represent time as the number of seconds or milliseconds since January 1, 1970, 00:00:00 UTC (the Unix epoch). This format is universal across programming languages and databases.

Why Convert Date to Unix Timestamp?

Code Examples

JavaScript

const date = new Date('2024-04-16T18:30:59'); const timestampSec = Math.floor(date.getTime() / 1000); const timestampMs = date.getTime(); console.log(timestampSec); // 1713293459 console.log(timestampMs); // 1713293459000

Python

import datetime date = datetime.datetime(2024, 4, 16, 18, 30, 59) timestamp = int(date.timestamp()) print(timestamp) # 1713293459

Common Use Cases

Frequently Asked Questions

Should I use seconds or milliseconds?

Use seconds (10 digits) for PHP, Python, and Unix systems. Use milliseconds (13 digits) for JavaScript, Java, and modern APIs that need millisecond precision.

How do I convert Unix timestamp back to date?

Use our Unix Timestamp to Date converter to convert timestamps back to readable dates.

What timezone is used?

The converter uses your local timezone by default. Unix timestamps are always stored in UTC, but the conversion accounts for your timezone offset.

💙

Support TechConverter

Get $200 free DigitalOcean credit or sponsor us on GitHub!