DATE() - DAY(DATE()) + 1For the file name you might try something like
FUNCTION isLegalFileName LPARAMETERS tcFile lnHandle = FCREATE(tcFile + ".@@@XXX") && FCREATE will overwrite existing file so force an extension which won't exist IF lnHandle > 0 && Legal File =FCLOSE(lnHandle) DELETE FILE (tcFile + ".@@@XXX") RETURN .T. ELSE RETURN .F. ENDIFBTW.........Mar'08 is a legal file name.