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: 23,771

Re: Day of the week

Esteemed Advisor
Posts: 5,540

Re: Day of the week

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

PG
Super User
Posts: 13,583

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
  • 312 views
  • 4 likes
  • 4 in conversation