Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!uunet!ncrlnk!ncrwat!images1!jrl From: jrl@images1.Waterloo.NCR.COM (john Latala) Newsgroups: comp.sys.handhelds Subject: time formats for HP28s Message-ID: <920@ncrwat.Waterloo.NCR.COM> Date: 24 Jul 90 01:41:25 GMT Sender: news@ncrwat.Waterloo.NCR.COM Reply-To: john.Latala@Waterloo.NCR.COM Organization: NCR Canada Ltd, Waterloo, Ontario, Canada. Lines: 35 Keywords: I was working on a program that did time/date manipulations. I ended up with a list of dates and wanted to sort them. This is where the problem started. I'm using a HP28 variations of a number of time routines that I used on my HP41. I modified the routines to follow the HP41 date/time format. Times are in the format HH.MMSSTT and dates are in the format MM.DDYYYY. Sorting dates in the MM.DDYYYY format doesn't work! January 1, 1991 (01.011991) is before July 1, 1990 (07.011990)! I was thinking about converting to something like YYYY.MMDD or even YYYYMMDD. After a bit more poking around I thought maybe going to a binary version might be a litte neater, something like #YYYYMMDDhhmmssttd. This format doesn't look to bad because I can get a complete date/time into one number, which is kind of a nice idea. Any other formats that may be more suitable to manipulation? In planning for when it happens how does the HP48 store/handle dates/times? My current routines actually keep the time as GMT. I then have a variable called 'TZ' that stores the number of (1/8192)'ths of a second that the local time zone is shifted from GMT. My date/time routines get the current tick count, add the 'TZ' variable and convert the result to either a date or a time. Do any other calculators besides the HP's offer this kind of date/time manipulation? -- john.Latala@Waterloo.NCR.COM