1

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 ?

sandeep bisht
  • 111
  • 12

1 Answers1

-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