BookmarkSubscribeRSS Feed
anirudhs
Obsidian | Level 7

i counted the week using the week function but when using week formats to display the week no and year then its giving me 1960w00.

can any one suggest me how to derive the count of week of the year and display it with its year using the Enterprise guide.

1 REPLY 1
Kurt_Bremser
Super User

The week formats expect SAS date values as input (days from 1960-01-01). Therefore a simple week number will give you a result in the beginning of 1960.

Use the week format directly on your SAS date value.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 967 views
  • 0 likes
  • 2 in conversation