FUNCTION STOD(tcDateString) * Converse of dtos. I use this to embed a date in a string of parameters, and extract it again. * The date string, of course, must conform to the standard imposed by the dtos() function: * yyyymmdd (8 digits, with no separators). if empty(tcDateString) return {} endif return date(; val(substr(tcDateString,1,4)),; val(substr(tcDateString,5,2)),; val(substr(tcDateString,7,2))) ENDFUNC && STODI didn't add error-checking yet; I am just realizing that date() will probably fail for Feb. 30, etc. In this case, you should return an empty string, or a null value (of date type).