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 (January 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 26 Jan 2011 11:17:03 -0800
Reply-To:   Tanmoy Mukherjee <tkmcornell@yahoo.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tanmoy Mukherjee <tkmcornell@YAHOO.COM>
Subject:   Re: Date Format and expressions
Comments:   To: Arthur Tabachneck <art297@ROGERS.COM>
Content-Type:   text/plain; charset=us-ascii

My bad Art. I thought the d at the end was by mistake and therefore dropped it.

Thanks a lot to all for resolving this query. I truly appreciate it.

Tanmoy Kumar Mukherjee 3 Perrine Court, East Brunswick, NJ 08816 Phone: 9173994540 Email: tkmcornell@yahoo.com

From: Arthur Tabachneck <art297@ROGERS.COM> To: SAS-L@LISTSERV.UGA.EDU Cc: Sent: Wednesday, January 26, 2011 2:12 PM Subject: Re: Date Format and expressions

Tanmoy,

You have to tell us more. The following works for me:

data have; format dist_date date9.; input dist_date mmddyy10.; if Dist_Date >= '01DEC2010'd; cards; 11/01/2009 12/12/2010 10/06/2008 ;

Art ------- On Wed, 26 Jan 2011 11:06:16 -0800, Tanmoy Mukherjee <tkmcornell@YAHOO.COM> wrote:

>Tried it but that does not work either. > > >Tanmoy Kumar Mukherjee >3 Perrine Court, >East Brunswick, NJ 08816 >Phone: 9173994540 >Email: tkmcornell@yahoo.com > > >From: Arthur Tabachneck <art297@ROGERS.COM> >To: SAS-L@LISTSERV.UGA.EDU >Cc: >Sent: Wednesday, January 26, 2011 1:51 PM >Subject: Re: Date Format and expressions > >Tanmoy, > >Try: if Dist_Date >= '01DEC2010'd > >Art >-------- >On Wed, 26 Jan 2011 10:46:33 -0800, Tanmoy Mukherjee <tkmcornell@YAHOO.COM> >wrote: > >>This is a very simple question but I haven't been able to look for it on >the SAS Help site and therefore asking for help from the group. >>I need to write a logical statement that if Dist_Date >=12/01/2010 then >maxrun=fctsperiod; >> >>However, when I write the following query it stops at 9/1/2010 itself. I >will appreciate if you can let me know what I am doing wrong. >> >>The query is attached as follows: >> >>data output; >>fcstperiod=12; >>Distrib_Date= 20100801; >>age=42; >>balance=100; >>Dist_Date=input(put(Distrib_Date,z8.),yymmdd8.); >>format Dist_Date mmddyy10.; >>do maxrun= 1 to fsctperiod; >>age=age+1; >>Dist_Date=intnx('month',Dist_Date,1); >>format Dist_Date mmddyy10.; >>balance=balance +100; >>if Dist_Date >= 11/1/2010 then maxrun=fcstperiod; >> output; >>end; >>run; >> >> >> >> >>Tanmoy Kumar Mukherjee >>3 Perrine Court, >>East Brunswick, NJ 08816 >>Phone: 9173994540 >>Email: tkmcornell@yahoo.com


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