Desktop productivity for business analysts and programmers

Format Date

Reply
Contributor
Posts: 58

Format Date

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

Grand Advisor
Posts: 10,210

Re: Format Date

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.


Contributor
Posts: 58

Re: Format Date

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.

Grand Advisor
Posts: 17,338

Re: Format Date

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

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

Contributor
Posts: 58

Re: Format Date

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

Community Manager
Posts: 2,693

Re: Format Date

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

Contributor
Posts: 58

Re: Format Date

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

Ask a Question
Discussion stats
  • 6 replies
  • 432 views
  • 0 likes
  • 4 in conversation