BookmarkSubscribeRSS Feed
Smitha9
Fluorite | Level 6

I have a dataset with

20170306

20180306

I want to change to 

2017-03-06

2018-03-06

with dashes.

 

 

2 REPLIES 2
Reeza
Super User
What is the variable type? If it's numeric with a date format, such as YYMMDDN8. you can switch it to YYMMDDD8. instead.

format variableName YYMMDDD8.;
Astounding
Opal | Level 21

Right idea, but switch instead to the YYMMDDD10. format to allow for a four-digit year.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

From SAS Users blog
Want more? Visit our blog for more articles like these.
5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 238 views
  • 4 likes
  • 3 in conversation