Re: Time Calculation
- Posted by Jeff Zeitlin <jzeitlin at CYBURBAN.COM> Nov 29, 1999
- 391 views
On Mon, 29 Nov 1999 00:01:17 -0500, Kat <KSMiTH at PELL.NET> wrote: >----- Original Message ----- >From: Jeff Zeitlin <jzeitlin at CYBURBAN.COM> >To: <EUPHORIA at LISTSERV.MUOHIO.EDU> >Sent: Sunday, November 28, 1999 12:38 AM >Subject: Re: Time Calculation >> If _very_ long shifts are a possibility (e.g., start at 10AM, >> finish at 2AM next morning), you'll also want to check to see if >> the end time is earlier than the start time, and if they are, >> swap them, calculate the difference, and then subtract that >> difference from 24 hours. That will cover everything except a >> shift that's 24 hours or longer. >This would work best if you logged the ticks from start of something, rather >than the calendar/clock time. Maybe Rob could put in a function to convert a >date/time to ticks_since_epoch, and back again. That way you can convert the >start time to ticks, then the end time, subtract, and you're done, with no >errors. You're absolutely correct, in this - but I'm not aware of any U4 function to convert to epochal ticks, and I was presuming the worst-case scenario for the incoming data, that its format was fixed as given, which meant that the date wasn't available. -- Jeff Zeitlin jzeitlin at cyburban.com