home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / bit / listserv / sasl / 5484 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.5 KB  |  40 lines

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