I have attached a sample dataset.
I can get the date format in date9. in data step.
DATA SAMPLE1;FORMAT SAMPLE_DT1 DATE9.;SET SAMPLE;SAMPLE_DT1 = DATEPART(SAMPLE_DT);RUN;
May i know how to get similar answer in PROC SQL? I used datepart in SQL but could not get it. Any idea? Thanks.
Try this one:
SELECT * , DATEPART(SAMPLE_DT) AS SAMPLE_DT1 FORMAT=date9.
View solution in original post
Need further help from the community? Please
ask a new question.