Running into trouble with a deadline here. Does anyone know how I can get the GMT timestamp since the UNIX Epoch? I've seen loads of examples in C#, but not VB.NET.
Am I correct in thinking the UNIX Timestamp is just a character string?. I would guess the only way to get the timestamp would be to write a simple VB function?
Remind me of the timestamp format and I'll see what I can do
Basically, the UNIX timestamp is just the number of seconds (though it is often the milliseconds that are counted) that have occured since 1st January 1970 (UNIX Epoch). I think its about 10 characters long now.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ts As TimeSpan = DateTime.op_Subtraction(DateTime.Now, New DateTime(1970, 1, 1, 0, 0, 0))
MessageBox.Show(ts.TotalSeconds)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.