I have a date format like below example. If i want to convert in MMDDYY10. Using DATEPART function it is not working
date='March 29, 2019 5:00:00 AM GMT+01:00';
Do we have any alternate way to convert character date to date format?
Please try the below code
data have; date='March 29, 2019 5:00:00 AM GMT+01:00'; newdate=datepart(input(scan(date,1,'G'),anydtdtm.)); format newdate mmddyy10.; run;
View solution in original post
Yes , you are right
thank you for your quick response.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
Register now
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.