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 (November 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 15 Nov 2000 08:39:04 -0500
Reply-To:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:   Re: Day of the week
Comments:   To: Rouet Alexandre <AlexandreRo@METRO.FR>
Content-Type:   text/plain; charset="iso-8859-1"

> From: Rouet Alexandre [mailto:AlexandreRo@METRO.FR] > Do you know if there is a way to get the day of a week using sas ? > (e.g. how to know that the 1st of july 2000 is a Saturday ? )

review the weekday function which returns in integer in (1:7) you could use a format to return the day in text:

proc FORMAT; value weekday 1='Sunday' 2='Monday' ...;

data _null_; *weekday = weekday(<valid SAS date>); weekday = weekday('12feb89'd); put Weekday= weekday.; stop;run;

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov OpSys: WinNT Ver: 8.1 ---> cheerful provider of UNTESTED SAS code!*! <---


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