BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
aanan1417
Quartz | Level 8

data a;

input dtevisit;

datalines;

22120715

;

run;

 

output 

24apr2022

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

How does 22120715 become 24apr2022 ?

View solution in original post

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

How does 22120715 become 24apr2022 ?

PaigeMiller
Diamond | Level 26

Marking an answer correct that is not an answer — but is actually a question from @PeterClemmensen — helps no one. Answering the question would be helpful.

--
Paige Miller
ballardw
Super User

What file type did you get that value from?

IF this is direct transfer from some other data system then that data likely uses a different base day number to date than SAS uses (01JAN1960).

Since you do not have a 24 in that random number then it appears that none of the digits correspond to day of month, month and the 22 may just be coincidence as a possible year value. (2-digit years are bad idea in general).