BookmarkSubscribeRSS Feed
lloraine
Calcite | Level 5

I have SAS Enterprise Guide 3.4.  I am trying to change the date format to 1/1/2013.  Every format I pick the results are ********.  Is there another place to change the date format to 1/1/2013 -  MMDDYYYYY

6 REPLIES 6
ballardw
Super User

Sometimes the ******** shows up because the display columns are to narrow to display the 10 characters of the formatted result. If you can create a wider column to display the values that could correct the issue. You don't mention where you are seeing this so only a guess.


lloraine
Calcite | Level 5

The column is wide enough.  I am in the query builder and I click on a date field and it gives me the option to change format.  Presently, there is nothing in the format and the results show 01MAR2013:00:00:00.  I want to show 3/1/2013 but when I choose one of the other date formats, all I get is ****** no matter how big the column.

Reeza
Super User

You have a date time variable, not a date variable.

You need a format such as dtdate9.  or dtmmddyy10. to show the date.

lloraine
Calcite | Level 5

dtmmddyy10 is not one of the options in the dropdown list under the date time

ChrisHemedinger
Community Manager

Here are some to try on for size:

IS8601DN10.

MDYAMPM27.

DTDATE9.

Beyond that, you have more date-related formatting options with a DATE variable, which you can get by running the data through Query Builder and calculate a new column with the DATEPART() function.

Chris

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
lloraine
Calcite | Level 5

I did finally use a calculated column - put(datepart(cl_eff_frm_dt), mmddyy10.)

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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