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 (February 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 14 Feb 2000 19:17:51 +0100
Reply-To:     peter.crawford@DB.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      Re: date format mmddyyyy needed
Comments: To: Frank.Poppe@pwcons.com
Content-type: text/plain; charset=us-ascii

Those wishing to use these format features (like delimiters) before v7/8 should see ftp.sas.com at /techsup/download/technote/ for the file ts486.txt

which describes (in)formats functions and call routines for all platforms of the SAS System, up to v6.11

It was the first place I discovered the usefulness of these delimiters > with x sep = "with x being C, D, N, P, or S to designate a comma, > "dash, null, period, or slash, respectively as the > "separator" seems like it wasn't describing the B(blank) at that stage (In)Formats supporting the x separator, are documented as MMYYxw. YYMMxw. YYQxw. YYQRxw. Since then there have been some additions, but the earlier document is still worth a read

and a quick check also reveals these formats with separators in the SAS Language Reference manual at v6.06 ! Surprising that the list of separators is not provided in the v8 on-line documentation !

Datum: 14.02.2000 12:07 An: SAS-L@listserv.uga.edu

Antwort an: Frank.Poppe@pwcons.com

Betreff: Re: date format mmddyyyy needed Nachrichtentext:

I have been looking in the on line help for v8, and found some formats where you can use the xw. specification: DDMMYY, YYMMDD, YYQR, YYQ, MMDDYY, MMYY and YYMM.

I did NOT find a list of possible values for x.

Some experimenting resulted in: N - none (14022000) B - blank (14 02 00) C - colon (14:02:00) D - dash (14-02-00) P - point=dot (14.02.00) S - slash (14/02/00, i.e. the default)

Frank Poppe PW Consulting BV SAS Software Expert Center

Jaclyn Whitehorn <jaclyn@bama.ua.edu> wrote in message news:200002102303.RAA08963@bama.ua.edu... > Dawn (and others) -- > Starting with SAS v7, there are new formats. Two that apply here are (I > think) called mmddyyxw. and ddmmyyxw. The x determines separator, if > any, and the w determines digits in year. I'm not in position to look up the > specs, but I'm pretty sure it's in the OnlineDoc if you're interested. > Have a nice evening! -- Jaclyn > ----- > > I am starting with a SAS date and I need a date in the format mmddyyyy (for > > another application). As far as I can find there is no SAS date format that > > will do this this. I have come up with the following which works but which I > > consider far too messy (especially since I'm going to have to convert four > > date variables this way). Does anyone have a better idea about how to do > > this? > > > > length day mo yr 8.; > > day=compress(day(begin_dt)); > > day2=put(day,z2.); > > > > mo = compress(month(begin_dt)); > > mo2=put(mo,z2.); > > > > yr = compress(year(begin_dt)); > > begin_d1=compress(mo2||day2||yr); > > > > Thanks in advance, > > > > Dawn > >


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