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 (October 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Oct 2011 18:24:22 +0000
Reply-To:     "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject:      Re: Fun With Dates
Comments: To: Mary Rosenbloom <>
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

As to your comment on knowing what you want the function to do, but not knowing its name:

If you know the category of function you want (character string, financial, date and time) you can give yourself a fighting change with the SAS "Functions and Call Routines by Category" page. At least then all the functions in the given category are listed consecutively.

In the SAS 9.2 world, you can start at "Functions and Call Routines" ( ) and then click on the "by Category" link.

Regards, Mark

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mary Rosenbloom Sent: Thursday, October 20, 2011 2:10 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Fun With Dates

Hi all,

I have some variables formatted as SAS dates (date9 format), such as:


Then I have character string, EVTDT, which has this form:

25 DEC 2011

I have been asked to make all of the "dates" look alike in format. I'm pretty sure that we need to keep the EVTDT variable as a character string, since it can sometimes contain a partial date, such as:

UNK DEC 2011

Questions: (1) Is there a date format like DATE9 but with spaces between the day and month, month and year?

(2) Is there a SAS function that can remove the spaces like this:

25 DEC 2011 -> 25DEC2011

I have found that it is sometimes hard to search for a function when you don't know it's name, only what it does.

Thanks so much for your help!

Cheers, Mary R.

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