I am converting about 600-thousand records from Microsoft SQL. The original database designer is, lets just say, "uncooperative. "
I have several fields that represent date, times, etc. I cannot figure out how the date is stored.
Here is an example:
The following record I know for certain corresponds to the date of 8/9/2002 (month-day-year).
The value in the date field (which is a varbinary(16)) in the database is:
0xDD3FC20120A42 A94000000000000 0000 - I know this is the date field.
I have tried the following:
Select Convert(char(16 ), date) from...
I then get the number with the following loop
(looking only at the 4 most significant bytes)
I get 19,742,630 hoping to find something like a Unix Epoch, but that number does not represent the correct date when treated like an Epoch.
Sooo - I am lost.
Anyone have any advice?
I have several fields that represent date, times, etc. I cannot figure out how the date is stored.
- I know the field [a varbinary(16)]
- I can get the value
- I have several known date sample records
Here is an example:
The following record I know for certain corresponds to the date of 8/9/2002 (month-day-year).
The value in the date field (which is a varbinary(16)) in the database is:
0xDD3FC20120A42 A94000000000000 0000 - I know this is the date field.
I have tried the following:
Select Convert(char(16 ), date) from...
I then get the number with the following loop
(looking only at the 4 most significant bytes)
Code:
For I = 4 To 1 Step -1 lClockTicks = lClockTicks * 256# lClockTicks = lClockTicks + Asc(Mid$(xDate, I, 1&)) Next I
Sooo - I am lost.
Anyone have any advice?
Comment