BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Sandeep77
Lapis Lazuli | Level 10

Hi all,

I have a data set which had date format 01/12/2000:00:00:00. I want to change it to 01/12/2000 format. I used the datepart function but the date I am getting is now in 01DEC2000 format. Can you suggest how to get the output in 01/12/2000 format?

Proc sql;
create table Linked_for_CF as 
select debt_code as accountnumber, 
 AddressLine1, 
AddressLine2, 
AddressLine3, 
AddressLine4, 
Postcode, 
Title, 
Forename, 
Surname,
Datepart (Dr_DOB) format date9. as Dateofbirth 
from Linked_acc;
quit;
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

After you use the datepart function, assign format mmddyys10.

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

After you use the datepart function, assign format mmddyys10.

--
Paige Miller
Sandeep77
Lapis Lazuli | Level 10
Thank you. It worked. I actually wanted it in ddmmyys10. format. Thanks again.
PaigeMiller
Diamond | Level 26

Adding ... don't assign it format DATE9. if you want some other format.

--
Paige Miller