BookmarkSubscribeRSS Feed
amylanza
Calcite | Level 5

Hello, 

 

Somehow my dates were input into my dataset wrong and I need to change them.

 

I have the dates as a string right now and they are in yyq6. format but in characters. So the current dates show 2017Q1, 2017Q2, etc. but are char$6 as a string.

 

What I want is to see 01JAN2017 for the string 2017Q1, 01APR2017 for the string 2017Q2 and so on. But not just a string of that - it needs to be a proper date format.

 

I feel like I have tried everything and at best it will error out and at worst it will set all of values for that variable to missing.

 

How can I do this??

 

Thank you for your help!!

1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 900 views
  • 2 likes
  • 2 in conversation