Answers for "unix timestamp convert in ms excel"

VBA
1

excel date to unix timestamp

'VBA functions to convert between Excel and Unix date-times.

'These work on Windows and optionally the Mac:

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
Posted by: Guest on March-31-2020
0

excel unix timestamp to date

=(B5/86400)+DATE(1970,1,1)
Posted by: Guest on July-15-2021

Code answers related to "unix timestamp convert in ms excel"

Code answers related to "VBA"

Browse Popular Code Answers by Language