Unix Timestamp Converter

Convert Unix Timestamp to Date

Current Time in Multiple Formats

Convert Date to Unix Timestamp

Human-Readable Time Units

Time UnitSeconds
1 Hour3600 Seconds
1 Day86400 Seconds
1 Week604800 Seconds
1 Month (30.44 days)2629743 Seconds
1 Year (365.24 days)31556926 Seconds

How to Convert Unix Timestamps

Convert Unix Timestamp in Excel

Excel doesn't natively support Unix timestamps, but you can convert them using simple formulas.

  1. Enter the Unix timestamp in a cell (e.g., A1).
  2. Use the formula `=(A1/86400)+DATE(1970,1,1)` to convert to datetime.
  3. Format the cell as a date/time to display correctly.

JavaScript Date to Unix Timestamp

JavaScript makes it easy to convert between dates and Unix timestamps using the Date object.

// Date to Unix timestamp
let timestamp = Math.floor(new Date().getTime() / 1000);
console.log(timestamp);

// Unix timestamp to date
let date = new Date(timestamp * 1000);
console.log(date.toLocaleString());

Using Online Unix Timestamp Converter

Our online tool allows you to input a Unix timestamp or datetime and instantly get the converted result.

Unix Timestamp Converter

A Unix timestamp is a numeric value representing the number of seconds elapsed since January 1, 1970 (UTC). It's widely used in programming and databases.

This tool helps you convert Unix timestamps to human-readable dates or convert datetime to Unix timestamps effortlessly.

Learn how to perform conversions in Excel, JavaScript, or using our online converter below.

Frequently Asked Questions (FAQ)

What is a Unix timestamp?

A Unix timestamp is the number of seconds since January 1, 1970, 00:00:00 UTC, also known as the Unix epoch.

How to convert Unix timestamp to datetime in Excel?

Use the formula `=(A1/86400)+DATE(1970,1,1)` where A1 is the cell with the timestamp, then format as a date.

How to convert datetime to Unix timestamp in JavaScript?

Use `Math.floor(new Date('YYYY-MM-DD').getTime() / 1000)` to get the Unix timestamp in seconds.

Can I convert Unix timestamps in different time zones?

Yes, adjust the datetime output to your desired time zone using Excel's time zone settings or JavaScript's toLocaleString() with options.

Why use Unix timestamps?

Unix timestamps are standardized, compact, and widely supported for storing and comparing dates in programming.