Current Unix Timestamp SECONDS SINCE JAN 01 1970

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

How to convert Unix timestamp to Datetime in DAX

🎈 🎈 🎈
+1

    ConvertedDate = DATE(1970, 1, 1) + (UnixTimestamp / 86400)        
        

Output:
2007-09-11 17:08:10
Example only. There may be multiple ways to perform this operation.

Code Explanation

In this DAX formula, DATE(1970, 1, 1) represents the start of the Unix epoch (January 1, 1970). The Unix timestamp is in seconds, so it is divided by 86400 (the number of seconds in a day) to convert it into days.
The result is added to the base date to obtain the corresponding date-time value. The result will be in the default date-time format.
For example, if UnixTimestamp is '1189530490', the result will be '2007-09-11 17:08:10'.



Other useful DAX date functions

Function Description Example
DATE() Returns a specific date (year, month, day). 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() Returns the year portion of a date. YEAR(DATE(2020, 5, 15)) returns 2020
MONTH() Returns the month portion of a date. MONTH(DATE(2020, 5, 15)) returns 5
DAY() Returns the day of the month portion of 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
DATEVALUE() Converts a date in text format to a date-time value. DATEVALUE("2020-05-15") returns 2020-05-15
TIMEVALUE() Converts a time in text format to a date-time value. TIMEVALUE("12:34:56") returns 12:34:56
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