BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a DATETIME variable that looks like 15NOV2007:09:08:00. I want to separate the Date and Time into separate variables. How do I do this while keeping the formatting. Thanks.
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
Use the DATEPART and TIMEPART functions to extract the pertinent pieces and then apply the appropriate formats to the resulting variables.
deleted_user
Not applicable
Thanks. I found the function about an hour after I posted.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 2 replies
  • 1262 views
  • 0 likes
  • 2 in conversation