Date: Tue, 26 Apr 2005 17:53:06 -0400
Reply-To: harry.droogendyk@RBC.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Harry Droogendyk <harry.droogendyk@RBC.COM>
Subject: Re: creating a date variable displaying all days in year
Content-Type: text/plain; charset="iso-8859-1"
SAS dates are simply numbers, the number of days since Jan 1, 1960, so a simple DO loop will do the trick. The 'date'd nomenclature is a method of specifying human-readable dates that SAS will convert to internal format.
data dates;
format date yymmddd10.;
do date = '01jan2005'd to '31dec2005';
output;
end;
run;
proc print;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
nevin.krishna@GMAIL.COM
Sent: Tuesday, April 26, 2005 5:40 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: creating a date variable displaying all days in year
hello all,
Is there a way in sas to create a dataset with all the dates in a year
from scratch?
such as...
date
01JAN05
02JAN05
03JAN05
.
.
.
31DEC05
Thanks for your help, nevin
__________________________________________________________________________________________________________________________________
This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite.
Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.