- Home
·
- Math/Dates
·
- Many applications store date information based on the epoch, January 1, 1970, 00:00:00 GMT, convert
Many applications store date information based on the epoch, January 1, 1970, 00:00:00 GMT, convert
Many applications store date information based on the epoch, January 1, 1970, 00:00:00 GMT, converted to milliseconds. This small piece lets
API Declarations
Public epoch
Rate Many applications store date information based on the epoch, January 1, 1970, 00:00:00 GMT, convert
(2(2 Vote))
' *** Just call the function with the epoch value you have.
' ***
' *** startDate: Is set to January 1st 1970, the start date
' *** of the Epoch.
' ***
' *** seconds: After calculating this holds the total amount
' *** of seconds from the epoch.
' ***
' *** gotDate: Holds the final result.
Private Function EpochToDate(epoch)
Dim seconds
Dim startDate As Date
startDate = #1/1/1970#
seconds = CDec(epoch) / 1000 'Convert milliseconds to seconds
gotDate = DateAdd("s", seconds, startDate) 'Add seconds to start date
End Function
Many applications store date information based on the epoch, January 1, 1970, 00:00:00 GMT, convert Comments
No comments yet — be the first to post one!
Post a Comment