It is not that complicated.
Since the format is CYYJJJ
and example of a field is 105241
we can assme that the first digit indicates the century and that the number 1 indicates the current century. Presumably the number 0 would indicate the prior century.
The next two digits is the year the final three is the day of the year.
I would use the following code:
WhilePrintingRecords;
stringvar jtext := totext({table.field},0,"");
numbervar yr :=IIF(jtext[1]="1",2000,1900)+VAL(jtext[2to3]);
date(yr-1,12,31)+VAL(jtext[4 to 6])
The date you provided, 105241 becomes August 29, 2005.
I hope this helps.
Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269