I am writing a c++ program to read DBF file of foxpro database .I stumbled upon this date time field of eight bytes.How can i interpret it ? Any help would be highly appreciated ?
Asked
Active
Viewed 889 times
1
-
What do you mean under "interpret"? It contains a simple datetime float value. – Oleg May 10 '14 at 05:53
-
@Oleg "It contains a simple datetime float value".i cant see that i mean what date it is ? – sandeep bisht May 10 '14 at 05:57
-
i want it in human readable form . – sandeep bisht May 10 '14 at 05:57
-
"0E 61 25 00 F8 BF EA 02" this is the value.it should match to " 11/21/1994 1:35:39 PM " – sandeep bisht May 10 '14 at 06:29
1 Answers
-2
The value is a double
The integer part is the day since 1899/12/30
internal const double JulianDay_1899_12_30 = 2415019.0;
double d = theValue;
in c#
return DateTime.FromOADate(d - JulianDay_1899_12_30);
see http://msdn.microsoft.com/en-us/library/system.datetime.fromoadate.aspx

Gregory Adam
- 117
- 1
- 3
-
managed code does give such facility of date manipulation .I found a solution in form of a function written in java . i converted it to c++ and its working fine now .wish unmanaged world had such functionality . – sandeep bisht May 13 '14 at 05:59