Help using Base SAS procedures

Turning a date into the acutal Day 'Monday'...etc.

Reply
Occasional Contributor
Posts: 10

Turning a date into the acutal Day 'Monday'...etc.

I have a data set that has info on airline flights for the month of march, 2010. I need to analysis which day of the week flights arrived on time most often and least often.

I am able to pull the numeric day out of the date by using : day=day(date);
but that is only returning a number. Does SAS know the days of the week based on the date? If so, how do I code?

Thanks!!
Regular Contributor
Posts: 165

Re: Turning a date into the acutal Day 'Monday'...etc.

While you could use a custom format or a series of if statements try using the weekdate9. format on the original date variable with a put function.

Good luck!
Occasional Contributor
Posts: 10

Re: Turning a date into the acutal Day 'Monday'...etc.

That did it! THANK YOU!
Ask a Question
Discussion stats
  • 2 replies
  • 125 views
  • 0 likes
  • 2 in conversation