We’re smarter together. Learn from this collection of community knowledge and add your expertise.

IF ONE VARIBLE HAVE A DIFFRENT DATE FORMAT

by Occasional Contributor rohithrao on ‎01-06-2015 12:54 AM - edited on ‎10-05-2015 03:17 PM by Community Manager (268 Views)

IF ONE VARIBLE HAVE  A DIFFRENT DATE FORMAT how can we read

 

EX:=

data date;

length d1 $ 10.;

  d1='13sep2002'd;output;

  d1='13/05/2002'd;output;

  d1='2002-05-13'd;output;

  run;

 

o/p

 

d1

13sep2002

13/05/2002

2002-05-13

 

i want to read this in to single format :smileysilly:plz give me answer for this

Comments
by Super Contributor
on ‎01-06-2015 09:12 AM

data want;

informat d1 anydtdte21.;

input d1;

format d1 date9.;

datalines;

13Sep2002

13/05/2002

2002-05-13

;

run;

by Super User
on ‎01-06-2015 09:34 AM

You've posted an Article not a question/discussion. Articles are intended to convey information, not necessarily ask questions for the user. 

Your turn
Sign In!

Want to write an article? Sign in with your profile.


Looking for the Ask the Expert series? Find it in its new home: communities.sas.com/askexpert.