BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

What type of variable is EVENTDATE?  Run PROC CONTENTS on the source dataset and check.

Is the TYPE of the variable numeric or character?
If numeric is their any FORMAT attached to it?  What FORMAT is attached?  

If the variable is numeric with a format used for displaying dates (DATE, MMDDYY, YYMMDD, etc) then you have a date variable.  Otherwise you will need to first convert EVENTDATE into date values.

 

If your variable has a DATE value then the QTR() function will return an integer from 1 to 4.  You will need to check the YEAR of the date if you only want the first two quarters in 2021.

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
  • 17 replies
  • 2707 views
  • 4 likes
  • 6 in conversation