At 2:11 PM -0800 11/8/00, Shawn Gordon wrote: >At 01:55 PM 11/8/2000, Mark Boyd wrote: >>Could someone help us with the intrinsic calendar date format? >>We're trying to rebuild dates from calendar date formats and the year always >>comes out wrong. >> >>Calendar returns today as 4023, when we try to turn that back into today, >>the year is 2001. > >according to my handy dandy Orbit Pocket Guide, bits 0:7 are the years >since 1900 range 0 to 127 (so 2027 is the end). Bits 7 to 9 are the day of >the year. Shawn probably means "Bits 7 to 15" or "starting with bit 7 for 9 bits". In any case, he's referring to the 16-bit return value of the CALENDAR intrinsic. Please note that there is also an HPCALENDAR intrinsic which returns a 32-bit value: 0:23 Year since 1900 23:9 Day of year Obviously, 24 bits is large enough to accommodate values for the next 16 million years or so, however the HPDATECONVERT intrinsic, which can accept this 32-bit format as input will only accept years up to 9999 as valid. Barry Lake [log in to unmask] Allegro Consultants, Inc. www.allegro.bogus.com (408)252-2330 -------- Attempting to reduce spam influx. Remove ".bogus" to create valid address.