Convert Timestamp to Date and Vice Versa

The current Unix Epoch time(stamp) is:

Convert Timestamp to Date

Enter a Unix timestamp to convert it into a human-readable timestamp date. Seconds, milliseconds, and nanoseconds are supported.


Type:

Convert Date to Timestamp

Enter a date and a timezone to convert it into a Unix timestamp.

You can also choose to enter a date string e.g. 04 Dec 2025 00:12:00 GMT (with or without timezone information) to convert to a Unix timestamp. If no timezone is set, the timezone that your browser provides will be used.

Convert Seconds to Time (Days, Hours, Seconds)

Enter seconds to convert into days, hours and seconds.

Calculate Date/Time Difference of two Unix Timestamps

Enter two Unix timestamps (in seconds), convert them to date and calculate the difference in seconds, minutes, hours and days.

How to Convert a Timestamp to Date?

In order to get the date of a Unix timestamp, you have to convert it to a human-readable date. Most programming languages have built-in support for converting Unix/epoch timestamps to dates and vice versa. Although not recommended, it's also possible to convert them by hand. With our online converter tool, you can easily convert Unix timestamps into different, standardized date formats and timezones.

What Exactly are Unix Epoch Timestamps?

A Unix Epoch Timestamp represents a date as a number. It is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This timestamp format is used very widely in computer systems and programming languages because it provides a simple and consistent way to deal with dates and times across different platforms and different time zones. Since Unix timestamps aren't dependent on a timezone, the actual conversion to the user's timezone is handled by the client. It's important to note that leap seconds aren't counted in Unix timestamps. Therefore, Unix timestamps don't accurately track the seconds elapsed since January 1, 1970, at 00:00:00 UTC and encode a pure linear count of seconds (without leap seconds!).

Seconds in a Minute, Hour, Day, Week, Year

Minute 60 seconds
Hour 60*60 = 3.600 seconds
Day 60*60*24 = 86.400 seconds
Week 60*60*24*7 = 604.800 seconds
Year 60*60*24*365 = 31.536.000 seconds

Our converter supports Unix timestamps in seconds, milliseconds, and nanoseconds. Most programming languages have native support for Unix timestamps and allow easy conversion of a timestamp to a human-readable date and vice versa.

Timestamp Nomenclature

While commonly known as Unix timestamps, they are also recognized by terms such as Unix time, POSIX time (Portable Operating System Interface), or epoch time. Despite the different names they all represent the same thing: the time in seconds since the epoch at January 1, 1970, at 00:00:00 UTC.

ISO 8601 and Unix Timestamps

ISO 8601 is an internationally understood, unambiguous calendar-and-clock format. Dates and times are written differently in various countries. North Americans write the month before the date, such as January 12, 2024, or 1/12/2021. However, Europeans write the date before the month, resulting in formats like 12 January 2024 or 12.01.2024. That's why it's important to use a standardized format when converting a Unix timestamp to a human-readable date. Our timestamp to date converter supports ISO 8601.

Get Current Unix Timestamp in Different Programming Languages

JavaScript
 
            //JavaScript
            function getTimestampInSeconds () {
                return Math.floor(Date.now() / 1000)
            }
        
Python
 
            #Python
            from time import time 
            def getTimestampInSeconds:
                int(time())
        
Go
 
            //Go
            import "time"
            func getTimestampInSeconds() int64 {
	            return time.Now().Unix()
            }
        
Java
 
            //Java
            import java.time.Instant
            ...
            long unixTimestamp = Instant.now().getEpochSecond();
            ...
        
PHP
 
            //PHP
            function getTimestampInSeconds(){
                return time();
            }
        
MySQL

            //MySQL
            SELECT UNIX_TIMESTAMP() 
            As TimestampInSeconds; 
        
More code examples

Why are Unix Epoch Timestamps Useful?

Unix epoch timestamps are very useful for a few reasons. They allow for easy manipulation of timestamps using simple arithmetic operations. Additionally, using a single number to represent a timestamp makes it convenient for storing and comparing dates. Moreover, epoch timestamps are not affected by time zones, which makes them a universal and a standard way to deal with time-related data in software.