LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 1998, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Apr 1998 09:59:32 -0400
Reply-To:     "Kowalczyk, Andrew" <AKowalczyk@NT.DMA.STATE.MA.US>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Kowalczyk, Andrew" <AKowalczyk@NT.DMA.STATE.MA.US>
Subject:      Re: Year 2000 problem: YYYYMMDD code
Comments: To: Ray Pass <raypass@WORLDNET.ATT.NET>,
          "EDSCC@CUNYVM.CUNY.EDU" <EDSCC@CUNYVM.CUNY.EDU>
Content-Type: text/plain

Despite SI's protestations that SAS in Y2K ready, we still get odd results like this: > 21 data _null_; > 22 a = today(); > 23 put a yymmdd7.; > 24 put a yymmdd8.; > 25 put a yymmdd9.; > 26 put a yymmdd10.; > 27 run; > > 980430 > 98-04-30 > 98-04-30 > 1998-04-30 > > What we really need is a new suite of formats like: YYMMDDCw. w=8,10 93:09:22 1993:09:22 YYMMDDDw. YYMMDDNw. w=6,8 930922 19930922 YYMMDDPw. YYMMDDSw. MMDDYYxw. DDMMYYxw. > ---------- > From: Ray Pass[SMTP:raypass@WORLDNET.ATT.NET] > As for FORMATs, that's another story, but it shouldn't be too > difficult to > set something up. As a matter of fact, I think there was a cute > little > solution here on SAS-L just a little while ago, but I didn't > keep it. Anyone? > > If you are doing a DATA _NULL_ report just: > > PUT TheDate YYMMN6. TheDate DAY2. ; /* tested */ > > or something like: > > LongDate = PUT(TheDate, YYMMN6.) || PUT(TheDate, DAY2.); /*not > tested*/ > > if you need it in a character variable > >


Back to: Top of message | Previous page | Main SAS-L page