Thanks,
Test code pretty much works as expected:
string dateFrmt = "MM'/'dd'/'yyyy";
string stdDate = "9/21/2004";
string dateAcquired = "10/18/2004";
double stdDateVal;
double dateAcquiredVal;
double diff;
str_to_date_custom(stdDate, dateFrmt, &stdDateVal);
str_to_date_custom(dateAcquired, dateFrmt, &dateAcquiredVal);
diff = dateAcquiredVal - stdDateVal;
printf( "stdDate = %lf;\n"
"dateAcquired = %lf;\n"
"diff = %lf days\n",
stdDateVal, dateAcquiredVal, diff );
Gives the following:
stdDate = 2453269.000000;
dateAcquired = 2453296.000000;
diff = 27.000000 days
So this will work for now.
-Matt
Matthew Meineke
mmeineke@memoralsb.org