BookmarkSubscribeRSS Feed
SAS_V_R
Calcite | Level 5

I have a variable called SCHOOL_YEAR--IT has a calendar and a clock on it, the closest way I can describe it is that it is numerical--NOT text. This variable normally looks like the bottom where it is just years. The variable character below is #.  can you help me? thanks.

 

SAS_V_R_0-1661954593894.png

SAS_V_R_1-1661954641537.pngbut  I need to make it look like years 

 

5 REPLIES 5
PaigeMiller
Diamond | Level 26

If I am understanding the question properly, you want to make the variable SCHOOL_YEAR show only the year and not the month, day or time.

 

All you have to do is assign it a different format. In code you could use

 

format school_year dtyear.;

 

 

or in the Enterprise Guide GUI, you can open the properties for SCHOOL_YEAR and assign the format DTYEAR. in the properties dialog box.

--
Paige Miller
SAS_V_R
Calcite | Level 5

Thank you. I want to make the top look like the bottom. I am not coding. I do not know how to code. 

SAS_V_R
Calcite | Level 5

You see? What do I add in Details? there is a syntax error. 

SAS_V_R_2-1661956071699.png

 

ChrisHemedinger
Community Manager

Can you share the syntax error to here? From the little screenshot you shared it looks like you are in the Query Builder, and to me it looks like you did the right thing by applying the DTYEAR format. Perhaps something else needs attention.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
PaigeMiller
Diamond | Level 26

I think someone else will need to help you here, as I don't use Enterprise Guide enough to give specific instructions.

--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 843 views
  • 0 likes
  • 3 in conversation