m****r 发帖数: 202 | 1 I have a charecter variable (Date "03/03/2010") and need to change to
date variable (Datevar 03MAR2010). The input function does work here,
how can I do ?
Thanks a lot | l*****8 发帖数: 483 | 2 format cc date9.;
bb='03/03/2010';
cc= mdy(substr(bb, 4,2)*1,substr(bb,1,2)*1,substr(bb,7.,4)*1);
run; | d******9 发帖数: 404 | 3 A=input(date, ddmmyy10.)
datevar=put(A,date9.) | m****r 发帖数: 202 | 4 Thank you both.
1.When use input, my problem is the length of the variable (Date "03/03/2010
") since it is substred from other original database. I checked and found
that its length is $92. Probably that's the reason why input(Date, mmddyy10
.) doesn't work here.
2.mdy()function works well here.
Thanks again | a*****3 发帖数: 601 | 5 data mqrlkr;
input mqrlkr :$100.;
mqrN = put(input(mqrlkr, mmddyy.), date9.); datalines;
5/6/60
;
赏个包子怎么样? 我这儿天寒地冻, 住着半个密林的房子 房东还不给开暖气 还让不
让人活了?
2010: ") since it is substred from other original database. I checked and
found : that its length is $92. Probably that's the reason why input(Date,
mmddyy10: .) doesn't work here.
【在 m****r 的大作中提到】 : Thank you both. : 1.When use input, my problem is the length of the variable (Date "03/03/2010 : ") since it is substred from other original database. I checked and found : that its length is $92. Probably that's the reason why input(Date, mmddyy10 : .) doesn't work here. : 2.mdy()function works well here. : Thanks again
| s******r 发帖数: 1524 | 6 what's the length if you use compress()?
2010
mmddyy10
【在 m****r 的大作中提到】 : Thank you both. : 1.When use input, my problem is the length of the variable (Date "03/03/2010 : ") since it is substred from other original database. I checked and found : that its length is $92. Probably that's the reason why input(Date, mmddyy10 : .) doesn't work here. : 2.mdy()function works well here. : Thanks again
|
|