From: yash on
Hi,

I have data in file like this

msisdn,subscriberid,serviceclassid,servicefeededucted,transactiondatetime,servicefeetype,servicefeedeductperiod,servicefeededucttype,servicefeedeductionsuccesscode
8008002010,49253981,1199,0.00,04 Mar 2010 10:26:14,FnFLocal71,,,6

While there's no problem for remaining fields, i am running out of
ideas for datetime field. How can i proceed for that. Currently i am
inputting it as char data and then converting to datetime. Please
provide your suggestions .
From: data _null_; on
On Jun 2, 4:54 am, yash <shaunak.adgaon...(a)gmail.com> wrote:
> Hi,
>
> I have data in file like this
>
> msisdn,subscriberid,serviceclassid,servicefeededucted,transactiondatetime,s­ervicefeetype,servicefeedeductperiod,servicefeededucttype,servicefeededucti­onsuccesscode
> 8008002010,49253981,1199,0.00,04 Mar 2010 10:26:14,FnFLocal71,,,6
>
> While there's no problem for remaining fields, i am running out of
> ideas for datetime field. How can i proceed for that. Currently i am
> inputting it as char data and then converting to datetime. Please
> provide your suggestions .

data _null_;
infile cards dsd;
input (4*d)(:$1.) datetime : datetime20.;
format datetime datetime20.;
put _all_;
cards;
8008002010,49253981,1199,0.00,04 Mar 2010 10:26:14,FnFLocal71,,,6
;;;;
run;