home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / software / 3119 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.6 KB

  1. Path: sparky!uunet!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!gaia.ucs.orst.edu!news
  2. From: tpugh@oce.orst.edu (Tim Pugh)
  3. Newsgroups: comp.sys.next.software
  4. Subject: Re: Adding/Subtracting Time With Improv
  5. Message-ID: <1gqehiINNd96@gaia.ucs.orst.edu>
  6. Date: 17 Dec 92 17:48:34 GMT
  7. Article-I.D.: gaia.1gqehiINNd96
  8. References: <johnr.724605076@mik.uky.edu>
  9. Reply-To: Tim Pugh <tpugh@oce.orst.edu>
  10. Organization: University Computing Services - Oregon State University
  11. Lines: 32
  12. NNTP-Posting-Host: tsunami.oce.orst.edu
  13.  
  14. In article <johnr.724605076@mik.uky.edu> johnr@nx39.mik.uky.edu (john s  
  15. roberts) writes:
  16. > Does anyone know how to get it to subtract and add time like you would
  17. > on a time sheet.  For example, I would type in an IN time and an OUT
  18. > time and it would calculate the amount of time worked in hours.
  19. > Thanks,
  20. > John
  21. > --
  22. > -=+ John S. Roberts, Jr.       FACTS Center  McVey Hall  Room 100  +=-
  23. > -=+ Communications Consultant  Work: (606)257-2275  Home: 272-1417 +=-
  24. > -=+ University of Kentucky     Ham: KD4UBM   DoD: 727   '85 Shadow +=-
  25. > -=+ Computing Center           HomeUUCP: johnr%agnostic@ms.uky.edu +=-
  26. ----
  27.              Monday      Tuesday ...
  28.       ---------------|----------
  29. IN           8:00 AM
  30. OUT          1:30 PM
  31.  
  32. time(hrs)    5.50
  33.  
  34. The IN and OUT are formatted with a time/date field.  The time(hrs) is  
  35. formatted with a normal real number (0.00).  When the times are subtracted,  
  36. they return a number with units of days.  So to obtain hours, multiple by 24.0.
  37.  
  38. Monday:'time(hrs)'  = (Monday:OUT  - Monday:IN )*24.0
  39.  
  40. --
  41. Tim Pugh
  42. College of Oceanic and Atmospheric Sciences
  43. Oregon State University
  44. tpugh@oce.orst.edu
  45.