home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a013 / 1.ddi / SOURCE.EXE / F_DTOL.PRG < prev    next >
Encoding:
Text File  |  1991-01-25  |  533 b   |  22 lines

  1. *****************************************************************
  2. FUNCTION DTOL (date_val)
  3. *****************************************************************
  4.  
  5. * Determines last day of the month from a date value
  6.  
  7. * Copyright(c) 1991 -- James Occhiogrosso
  8.  
  9.  
  10. IF date_val = NIL
  11.     * Default to current date if no value passed
  12.     date_val = DATE()
  13.  
  14. ELSEIF VALTYPE(date_val) != 'D'
  15.     * Return a null date if argument is wrong type
  16.     RETURN CTOD("")
  17.  
  18. ENDIF
  19.  
  20. RETURN date_val + (LASTDAY(date_val) - DAY(date_val))
  21.  
  22.