LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Jun 2000 20:48:05 GMT
Reply-To:     Andreas Grueninger <grueninger@IBGRUENINGER.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andreas Grueninger <grueninger@IBGRUENINGER.DE>
Organization: Customer of UUNET Deutschland GmbH
Subject:      Re: SAS/Base: Date Format dd-mmm-yyyyy

DATA X ; LENGTH cd1 $11; testdate = '15JAN2000'd; cd1 = TRANSLATE( TRIM( LEFT( PUT( testdate, WORDDATX12. ))),'-',' ' ) ; PUT cd1=; RUN ;

Bill_Knowlton@BAXTER.COM (Bill Knowlton) wrote:

>Is anyone privy to a SAS date format that can display dates as dd-mmm-yyyy, >where mmm is the alphabetic month (e.g. Apr, Aug) and the separators are >dashes. Example resolution: 17-Jan-2000. > >I've cobbled together this monster for getting the look, but I loose the >date's chronology functionality on converting to character: > > data X ; > length TESTDATE 4 CD1 $9 CD2 $11 ; > TESTDATE = input('15JAN2000',date9.) ; > CD1 = put(TESTDATE, date9.) ; > CD2 = substr(CD1,1, 2)||"-"||substr(CD1,3,3)||"-"||substr(CD1,6,4) ; >run ; > >, plus this is not very appealing. > >Thanks for any insights. > >-Bill

Ingenieurbuero Grueninger Uhlbergstr. 15 72631 Aichtal (Germany) email: grueninger@ibgrueninger.de


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