sql unix timestamp to date code example
Example 1: mysql date format unix timestamp
SELECT
FROM_UNIXTIME(timestamp)
FROM
your_table;
Example 2: sql convert unix time to date
select FROM_UNIXTIME(UNIX_TIMESTAMP(),
Example 3: excel date to unix timestamp
Function UnixDateTime#(ExcelDateTime As Date, Optional Mac As Boolean)
Dim OSOffset: OSOffset = IIf(Mac, 24107, 25569)
UnixDateTime = (ExcelDateTime - OSOffset) * 86400
End Function
Function ExcelDateTime(UnixDateTime#, Optional Mac As Boolean) As Date
Dim OSOffset: OSOffset = IIf(Mac, 24107, 25569)
ExcelDateTime = (UnixDateTime / 86400) + OSOffset
End Function