DATA Step, Macro, Functions and more

Day of the week

Reply
Contributor
Posts: 40

Day of the week

I have 4 years worth of data and want to create a new variable at the individual level looking at DOD and crete dummy variables for Fridays, weekends, other weekday

 

is there a quick way to do that?

 

thanks,

malena

 

Super User
Posts: 19,770

Re: Day of the week

Respected Advisor
Posts: 4,919

Re: Day of the week

dayCat = char("WOOOOFW", weekday(date));

PG
Super User
Posts: 11,343

Re: Day of the week


PGStats wrote:

dayCat = char("WOOOOFW", weekday(date));


 

Makes me want to find a reason to search EIEIO ... Smiley Happy

Ask a Question
Discussion stats
  • 3 replies
  • 252 views
  • 4 likes
  • 4 in conversation