Some applications store dates as eight-digit integer in the following format: YYYYMMDD For example, March 1, 2002 would be stored as 20020301. One way to convert this to date field that can be manipulated and formatted correctly is to use the following formula:
Stringvar dt := Totext({table.field},0,”"); Date(Val(dt[1 to 4]),Val(dt[5 to 6]),Val(dt[7 to 8]));
dt;