home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!uvaarpa!darwin.sura.net!paladin.american.edu!auvm!PENNSAS.UPENN.EDU!MKEINTZ
- Organization: Univ. of Penn. David Rittenhouse Computing Facility
- Message-ID: <SAS-L%92082707444593@OHSTVMA.IRCC.OHIO-STATE.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Thu, 27 Aug 1992 07:27:24 EST
- Reply-To: Mark Keintz <MKEINTZ@PENNSAS.UPENN.EDU>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Mark Keintz <MKEINTZ@PENNSAS.UPENN.EDU>
- Subject: Re: SAS time values
- Comments: To: Deb Cannon 319-335-6321
- <ADPDKHTS%UIAMVS.BITNET@OHSTVMA.ACS.OHIO-STATE.EDU>,
- SAS-L@OHSTVMA.ACS.OHIO-STATE.EDU
- In-Reply-To: Your message of Tue, 25 Aug 1992 15:43:00 CDT
- Lines: 34
-
- >CONTENT: question
- >SUMMARY: how to convert numeric to time values
- >REL/PLTF: 5.18/MVS 6.06/MVS 6.07/MVS 6.06/OS/2 6.04/PC-DOS
- >E-ADDR: adpdkhts@uiamvs.bitnet
- >NAME: Deb Cannon
- >PHONE: 319-335-6321
- >----------------------------------------------------------------------
-
- Deb:
-
- Is it REALLY 4-byte (signed) packed as HH:MM:SSS?
- If so you could save a little processing by reading the HH and MM
- parts directly as UNSIGNED packed variables, and then read the seconds
- as signed packed, sort of like the below.
-
- input hh pk1. mm pk1. sss pd2.1;
- timevar=hms(hh,mm,sss);
- drop hh mm sss;
-
- I assume that the three digit second field has an inplied decimal
- point. It may not matter however -- my documentation on the HMS
- function discusses the "seconds" argument as an integer, and I haven't
- tested whether it preserves the tenths-of-a-second value.
-
- If your data (in hexadecimal) really looks like 0hhmmssF, and NOT
- like hhmmsssF (that I assume above) then just use the PDTIME4.
- format documented on page 657 of the Version 6 (first edition)
- SAS Language reference manual.
-
- Mark
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Mark Keintz mkeintz@pensas.upenn.edu Ph: 215/898-6713
- Population Studies Ctr/6298 Phila., PA 19104 USA
-