He was probably using the API 2 epoch of 1970-01-01.
Horst,
Dave beat me to it. You can determine the “epoch” for this custom date format with API 2 code like this:
Var startdt As DateTime = DateTime.FromString("2012-05-03")
Var di As New DateInterval
di.Seconds = 3.57693e+08
Var enddt As DateTime = startdt - di
MessageBox enddt.ToString
Of course, the seconds you list have been been truncated because of the exponential format, which is probably why the above results in Dec 31, 2000 at 11:50:00 PM. Using the full, accurate value from the db should result in 2001-01-01 as Dave suggests. You should test this against a few of the values to confirm this assumption.
Well it was fairly clear that if the expectation was that the date should be 2012-05-03, then 3.57693e+08 was not going to be anywhere near enough. I was just pointing out that with this value, a date of May 1981 would be OK if you have the belief that the number given was a unixepoch.
It clearly isn’t and since posting the above I’ve been trying to see how 2012-05-03 relates to 3.57693e+08 but I’ve been going about it the wrong way.
if the date is supposed to be 2012-05-03 and you have 3.57693e+08 it appears that the date value in the DB is based off of Jan 1, 2001(an offset of 30611155000 seconds)
Dim d2 As New date
d2.TotalSeconds = 3.57693e+08
Dim baseDate As New Date
baseDate.TotalSeconds = 3061155000
Dim d3 As New date
d3.TotalSeconds = d2.TotalSeconds + baseDate.TotalSeconds
Break
but you’d have to test this with other well know values to see if this holds true for other date values