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

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 526 views
  • 1 like
  • 4 in conversation