home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION DTOF (date_val)
- *****************************************************************
-
- * Determines first day of the month from a date value
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
-
- IF date_val = NIL
- * Default to current date if no value passed
- date_val = DATE()
-
- ELSEIF VALTYPE(date_val) != 'D'
- * Return a null date if argument is wrong type
- RETURN CTOD("")
-
- ENDIF
-
- RETURN date_val - (DAY(date_val) -1)
-
-