Help using Base SAS procedures

How to convert a charecter variable to a new variable with date format .

Reply
N/A
Posts: 0

How to convert a charecter variable to a new variable with date format .

I have variable called 'a' with charecter datatype.From this i want to create a new variable 'b' with date format.

eg;

A
20040601
20031112

B
01/06/04
12/11/03


Thanks in advance.
N/A
Posts: 0

Re: How to convert a charecter variable to a new variable with date format .

Posted in reply to deleted_user
use INPUT with a date informat like yymmdd.

preferably the INPUT statement, as the data is loaded.
Alternatively, the INPUT function

Good Luck

PeterC
N/A
Posts: 0

Re: How to convert a charecter variable to a new variable with date format .

Posted in reply to deleted_user
Please read the SAS documentation about programming in SAS and about its wonderful richness of features.

http://support.sas.com/documentation/
Ask a Question
Discussion stats
  • 2 replies
  • 108 views
  • 0 likes
  • 1 in conversation