HP3000-L Archives

August 2005, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Collins <[log in to unmask]>
Reply To:
Bruce Collins <[log in to unmask]>
Date:
Mon, 15 Aug 2005 13:26:43 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
Jeff Vance wrote:

To get the ending time, which will need to be converted to a 24 hour
clock, you can:
   setvar ampm word(file_record,,-1)
   setvar hour decimal(word(file_record,,-2))
   if ampm = "PM" then
      setvar hour hour+12
   endif

=========

Changing from AM/PM to the 24 hour clock isn't quite that simple. You also
have to treat 12 as a special case

12:30 PM is 30 minutes afternoon and remains 12:30 in the 24 Hour system
12:30 AM is 30 minutes midnight and should be converted to 00:30

12 PM should convert to 12 and 12 AM should convert to 00.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2