Date: Thu, 8 Jun 2006 16:00:16 GMT
Reply-To: LWn <lars.wahlgren.pleasenospam@STAT.LU.SE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: LWn <lars.wahlgren.pleasenospam@STAT.LU.SE>
Organization: Telia Internet
Subject: Re: SAS date functions
""data _null_;"" <datanull@GMAIL.COM> skrev i meddelandet
news:7367b4e20606080756j31fff59eg2f3ee0bd95bde448@mail.gmail.com...
> Does this look right? I know it is for 2006.
>
Problem 2009:
1 data _null_;
2 do year = 2000 to 2010;
3 dltB=intnx('WEEK',mdy(3,31,year),1);
4 dltE=intnx('WEEK',mdy(11,1,year),0);
5 put (dlt:) (=weekdate25.);
6 end;
7 run;
dltB=Sunday, Apr 2, 2000 dltE=Sunday, Oct 29, 2000
.
.
.
dltB=Sunday, Apr 5, 2009 dltE=Sunday, Nov 1, 2009
dltB=Sunday, Apr 4, 2010 dltE=Sunday, Oct 31, 2010
/LWn
|