phone: (540)338-0194
email: ken@kenhamady.com

 ReCrystalize

Numeric Date to True Date:

This formula is for converting dates stored in the 8-digit numeric format, YYYYMMDD,  (e.g. Macola Accounting) into true date values.

Local NumberVar y := {Table.NumericDate};
Local StringVar z := Totext (y, 0,"");
z := Picture (z, 'xxxx-xx-xx');
If IsDate (z)
then DateValue(z)

This version works for the 6-digit numeric formats MMDDYY or YYMMDD.

Local NumberVar y := {Table.NumericDate};
Local StringVar z := Totext (y, 0,"");
z := Picture (z, 'xx-xx-xx');
If IsDate (z)
then DateValue(z)