Brian:

It might be a bit of an overkill, but you may want to check out the work of
Peter Baum at 
<http://mysite.verizon.net/aesir_research/info2.htm>http://mysite.verizon.net/aesir_research/info2.htm.
  He has a
rather unique way of dealing with leap years.  A few years back I based some
code that had to calculate retention periods specified in days, weeks or
years for Centera and Network Storage (UNIX epoch), on his algorithm.
Unfortunately, the code now belongs to a client, so itÂ’s not sharable.

Art



At 09:21 PM 1/4/2012, Brian Westerman wrote:

>Hi,
>
>I have a module that I created many years ago that computes the number of
>days between two dates, but I have been asked if there is a way to expand it
>to compute the total time between the two dates as well (if supplied with
>the HH:MM:SS as well).
>
>In the past I have always calculated elapsed time via starting with the STCK
>times, subtracting them and then converting them to a readable format, but
>in this case I have the fields already as start-MM/DD/YY HH:MM:SS
>end-MM/DD/YY HH:MM:SS.
>
>When I work backwards from seconds to hours, I keep getting screwed up on
>the days part. Is there an already existing program I can copy that someone
>can share before I drive myself nuts? (well, more nuts).
>
>Thanks,
>
>Brian

Reply via email to