The SQL Server DB I am going against holds Unix Time,
and I need to be able to search against this field to get all records for that day, weekly, monthly
this get's me the current date time, and shows the Unix value, but I strip the time off so I can just use the date to search by.
and I need to be able to search against this field to get all records for that day, weekly, monthly
this get's me the current date time, and shows the Unix value, but I strip the time off so I can just use the date to search by.
Code:
Dim dtUTC As DateTime = DateTime.UtcNow
Dim dtStart As New DateTime(1970, 1, 1)
Dim tsDifference As TimeSpan = dtUTC.Subtract(dtStart)
Dim dblUnixStamp As Double = System.Math.Floor(tsDifference.TotalSeconds)