home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR503.W96 / SECS.PR_ / SECS.PR
Text File  |  1995-06-20  |  561b  |  31 lines

  1. /***
  2. *
  3. *  Secs.prg
  4. *
  5. *  Summer '87 SECS() Compatibility Routine
  6. *
  7. *  Copyright (c) 1993, Computer Associates International Inc.
  8. *  All rights reserved.
  9. *
  10. */
  11.  
  12.  
  13. /***
  14. *
  15. *    SECS( <time string> )
  16. *
  17. *    Return numeric seconds as a quantity of the time string
  18. *
  19. *    Note: Seconds in time period
  20. *         -------    -----------
  21. *              60    1 minute
  22. *            3600    1 hour
  23. *           86400    1 day
  24. */
  25. FUNCTION SECS(cl_time)
  26.     RETURN VAL(       cl_time    ) * 3600 +;
  27.            VAL(SUBSTR(cl_time,4)) *   60 +;
  28.            VAL(SUBSTR(cl_time,7))
  29.  
  30.  
  31.