Help using Base SAS procedures

SAS Date question

Reply
New Contributor
Posts: 4

SAS Date question

How would one convert a date input from a data set  in a character format like "02/01/2013" or perhaps "20130509"  to a SAS date ?

New Contributor
Posts: 3

Re: SAS Date question

For character format like "02/01/2013", try ...

    new_date = input(character_date, ??MMDDYY10.) ;

For charachter format like "20130506", try...

    new_date = input(character_date, ??YYMMDD10.) ;

New Contributor
Posts: 4

Re: SAS Date question

Worked great !  So simple ... I feel real dumb.  Thanx !!!

Ask a Question
Discussion stats
  • 2 replies
  • 191 views
  • 1 like
  • 2 in conversation