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 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Jun 2003 12:24:27 -0700
Reply-To:     Prasad S Ravi <prasad.s.ravi@HOUSEHOLD.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Prasad S Ravi <prasad.s.ravi@HOUSEHOLD.COM>
Subject:      Re: datepart autoformat in a macro
Comments: To: Arto Raiskio <arto@RAISKIO.COM>
Content-type: text/plain; charset=us-ascii

Arto:

I don't recall any dateformat which will do that for you.

why not create another variable say b with just the sas date value, create a macro variable of it and compare that value in your PROC SQL where statement.

b=intnx ( 'day', date(), -1); call symput('b',b);

and datepart('01jan70:00:00:00'dt+A.occurrance) = &b ) ^^^^^

Prasad Ravi

Arto Raiskio <arto@RAISKIO.COM> To: SAS-L@LISTSERV.UGA.EDU Sent by: "SAS(r) cc: Discussion" Subject: datepart autoformat in a macro <SAS-L@LISTSERV.UGA.E DU>

06/23/2003 12:00 PM Please respond to Arto Raiskio

section of a macro executes an item that appears as

a = put( intnx ( 'day', date(), -1), mmddyy6. );

this returns to a macrovariable in another section today-1, ie. 062203

question is, what dateformat would return the value in the format '22Jun2003'd ? with quotes and D, all of it?

pseudocode: a = put( intnx ( 'day', date(), -1), ddMMMyyyy. );

this code is passed on to a Proc SQL which extracts data in the format

..and (datepart('01jan70:00:00:00'dt+A.occurrance) = '22jun2003'd )


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