🔍 Convert Date to Unix Timestamp
Select a date and time to convert
Convert dates to Unix timestamps instantly
Select a date and time to convert
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.
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
import datetime date = datetime.datetime(2024, 4, 16, 18, 30, 59) timestamp = int(date.timestamp()) print(timestamp) # 1713293459
Use seconds (10 digits) for PHP, Python, and Unix systems. Use milliseconds (13 digits) for JavaScript, Java, and modern APIs that need millisecond precision.
Use our Unix Timestamp to Date converter to convert timestamps back to readable dates.
The converter uses your local timezone by default. Unix timestamps are always stored in UTC, but the conversion accounts for your timezone offset.
Get $200 free DigitalOcean credit or sponsor us on GitHub!