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).

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 692 views
  • 1 like
  • 4 in conversation