VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Turn Time and Date to Epoch Turn Epoch to Time and Date

C. Alexander  (1 Submission)   Math/Dates   Visual Basic 5.0   Unknown Difficulty   Mon 11th November 2002   Mon 8th February 2021

Turn Time and Date to Epoch Turn Epoch to Time and Date

API Declarations



'** DateToEpoch was originally found at:
'** http://www.vbcode.com/asp/showsn.asp?theID=3476
'** written by Markus Hartsmar
'**
'** I've shortened this function, and added reversal
'**

Public Property Get Epoch() As String
Epoch = DateDiff("s", "00:00:00 1/1/1970", Now)
End Property

Public Property Get DateToEpoch(ByVal MyDate As Date) As String
DateToEpoch = DateDiff("s", "00:00:00 1/1/1970", MyDate)
End Property

Public Property Get EpochToDate(ByVal MyEpoch As String) As Date
EpochToDate = DateAdd("s", MyEpoch, "00:00:00 1/1/1970")
End Property


Rate Turn Time and Date to Epoch Turn Epoch to Time and Date (1(1 Vote))
Turn Time and Date to Epoch Turn Epoch to Time and Date.bas

Turn Time and Date to Epoch Turn Epoch to Time and Date Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters