Current Unix Timestamp SECONDS SINCE JAN 01 1970

Current UTC Time
2025-08-20
Convert Datetime to Unix Timestamp in Excel

How to convert Datetime to Unix timestamp in Excel

🎈 🎈 🎈
+1

    =(A1 - DATE(1970, 1, 1)) * 86400
        

Output:
1252202323
Example only. There may be multiple ways to perform this operation.

Code Explanation

In this Excel formula for converting a date to a Unix timestamp, A1 is the cell containing the date you want to convert. The formula subtracts DATE(1970, 1, 1) from the date in A1 to get the number of days since 1970-01-01.
Multiplying the result by 86400 converts it from days to seconds, which gives the Unix timestamp. For example, if cell A1 contains '2022-05-15 08:30:45', the result will be 1252202323.



Other useful Excel date functions

Function Description Example
DATE() Creates a date from year, month, and day values. DATE(2020, 5, 15) returns 2020-05-15
TODAY() Returns the current date (without the time). TODAY() returns 2024-08-28
NOW() Returns the current date and time. NOW() returns 2024-08-28 12:34:56
YEAR() Extracts the year from a date. YEAR(DATE(2020, 5, 15)) returns 2020
MONTH() Extracts the month from a date. MONTH(DATE(2020, 5, 15)) returns 5
DAY() Extracts the day from a date. DAY(DATE(2020, 5, 15)) returns 15
HOUR() Returns the hour portion of a time value. HOUR(NOW()) returns 12
MINUTE() Returns the minute portion of a time value. MINUTE(NOW()) returns 34
SECOND() Returns the second portion of a time value. SECOND(NOW()) returns 56
TEXT() Formats a date or number using a custom format string. TEXT(NOW(), "yyyy-mm-dd hh:mm:ss") returns 2024-08-28 12:34:56
DATEVALUE() Converts a date in text format to an Excel date value. DATEVALUE("2020-05-15") returns 43962 (date serial number)
TIMEVALUE() Converts a time in text format to an Excel time value. TIMEVALUE("12:34:56") returns 0.524259 (time serial number)
EOMONTH() Returns the last day of the month for a given date. EOMONTH(TODAY(), 0) returns the last day of the current month.
EDATE() Returns a date that is a specified number of months before or after a given date. EDATE(TODAY(), -1) returns the date one month before today.
Current Unix Timestamp SECONDS SINCE JAN 01 1970

Current UTC Time
2025-08-20
Ad Banner Placeholder
Ad Banner Placeholder
Ad Banner Placeholder
Ad Banner Placeholder