From: Nathalie Billaudeau on
I want to create a binary variable which equals 1 if the date is the
week (between Monday and Friday) and 0 if it's the weekend (Saturday
or Sunday) from a variable date MMDDYY10.

From: stickerr on
On Feb 2, 12:26 pm, Nathalie Billaudeau <nathaliebillaud...(a)gmail.com>
wrote:
> I want to create a binary variable which equals 1 if the date is the
> week (between Monday and Friday) and 0 if it's the weekend (Saturday
> or Sunday) from a variable date MMDDYY10.

WEEKDAY( date )
returns the day of the week from a SAS date value.
From: Arthur Tabachneck on
Nathalie,

I think you are asking for something like the following:

data have;
format date date9.;
do date="1feb2010"d to "8feb2010"d;
output;
end;
run;

data want;
set have;
x=WEEKDAY( date );
want=not(WEEKDAY(date) in (1,7));
run;

HTH,
Art
---------
On Tue, 2 Feb 2010 09:26:20 -0800, Nathalie Billaudeau
<nathaliebillaudeau(a)GMAIL.COM> wrote:

>I want to create a binary variable which equals 1 if the date is the
>week (between Monday and Friday) and 0 if it's the weekend (Saturday
>or Sunday) from a variable date MMDDYY10.