Date Converter - 1 line of code
Converts a Date to Unix format. (e.i. the number of seconds since January 1, 1970.)
AI
Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Kaynak Kod
Public Function UnixDate(vDate As Date) As Long
'Returns Unix Date (number of
' seconds since Jan 1, 1970)
' Example: Text1.Text = UnixDate(Now)
UnixDate = DateDiff("s", "1/1/1970 12:00:00 AM", vDate)
End Function
Public Function FromUnixDate(vUnixDate As Long) As Date
'To Convert Back
FromUnixDate = DateAdd("s", vUnixDate, "1/1/1970 12:00:00 AM")
End Function
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı