Good day, I'm looking for anybody who has seen or written a function that converts a normal VB6 Date to the UNIX data format. I believe the format is the number of seconds since 1970??
Thanks
Printable View
Good day, I'm looking for anybody who has seen or written a function that converts a normal VB6 Date to the UNIX data format. I believe the format is the number of seconds since 1970??
Thanks
Thought I would make you laugh and roll your eyes
Dim b As Variant
Dim c As Variant
Dim d As Long
c = 60 * 60
c = c * 24
d = ((Format(Now, "yyyy") - 1971)) * 365
Do Until Format(Now - d, "yyyymmdd") = "19700101"
d = d + 1
Loop
c = d * c
b = (Format(Now, "hh:mm:ss"))
b = ((Val(Left$(b, 2) * 60) + Val(Mid(b, 4, 2))) * 60) + Val(Mid(b, 7, 2))
MsgBox Val(c) + Val(b)