BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
keds
Calcite | Level 5

Hi All ,

i was just wondering if we have a sas format for "19 Aug , Mon". i have a date which needs to be converted to this format , do we have a inbuilt sas format which can give me this ? or any other way ?

Thanks

Keds

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

If that's exactly your format then no, you'll need to "roll your own".

proc format;

    picture date_custom_fmt (Default=45)

        low - high = '%d %b, %a'

    (datatype = date);

run;

data have;

dt='01JUN2014'd;

format dt date_custom_fmt.;

run;

See pages 14+:

http://www2.sas.com/proceedings/sugi31/243-31.pdf

View solution in original post

3 REPLIES 3
stat_sas
Ammonite | Level 13

Try this.

data have;

dt='01JUN2014'd;

format dt WEEKDATE.;

run;

proc print;

run;

Reeza
Super User

If that's exactly your format then no, you'll need to "roll your own".

proc format;

    picture date_custom_fmt (Default=45)

        low - high = '%d %b, %a'

    (datatype = date);

run;

data have;

dt='01JUN2014'd;

format dt date_custom_fmt.;

run;

See pages 14+:

http://www2.sas.com/proceedings/sugi31/243-31.pdf

keds
Calcite | Level 5

stat@sas this is coming as Friday ,  1 Jun , 2014. wanted very specific like "19 Aug , Mon".

Thanks Reeza , this worked out as i wanted.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 946 views
  • 0 likes
  • 3 in conversation