home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!paladin.american.edu!auvm!!INFO,
- X-Envelope-to: sas-l@ohstvma.bitnet
- X-VMS-To: SASL
- MIME-version: 1.0
- Content-transfer-encoding: 7BIT
- Message-ID: <01GSVSG9IEIU8ZEDI5@CUBLDR.Colorado.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Tue, 29 Dec 1992 09:14:25 -0700
- Reply-To: "Gary Pfeifer, Research & Info,
- 2-6743" <PFEIFER_G@CUBLDR.COLORADO.EDU>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "Gary Pfeifer, Research & Info,
- 2-6743" <PFEIFER_G@CUBLDR.COLORADO.EDU>
- Subject: Re: SAS date informats
- Comments: To: sas-l@ohstvma.bitnet
- Lines: 21
-
- Ann Fowler writes
-
- > I have an ascii file that has dates for which I've not been
- > able to find informats when reading it. One of the dates is
- > in the form mmddyyyy eg. 06231984. The other one is in the
- > form mmyy eg. 0790. I'm using PC SAS 6.04 but I've to admit
- > that my manuals are for 6.03. Any quick help will be much
- > appreciated.
-
- for the first date, in mmddyyyy form, simply use the mmddyy. informat, as
- in INPUT @11 DATE MMDDYY. ;
-
- for the second I am afraid that you must read it in as a character var,
- concatenate a day value onto it, and then convert it to a sas date.
- i.e. LENGTH CHARDATE $6 ;
- INPUT @20 CHARDATE $4. ;
- CHARDATE = '01' || CHARDATE ;
- SASDATE = INPUT(CHARDATE,DDMMYY.) ;
-
- Gary Pfeifer
- pfeifer_g@cubldr.colorado.edu
-