BookmarkSubscribeRSS Feed
lgtea57
Calcite | Level 5
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!!
2 REPLIES 2
RickM
Fluorite | Level 6
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!
lgtea57
Calcite | Level 5
That did it! THANK YOU!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 765 views
  • 0 likes
  • 2 in conversation