BookmarkSubscribeRSS Feed

[SAS 활용 FAQ] 함수 – 형변환함수

Started ‎11-11-2021 by
Modified ‎11-11-2021 by
Views 297

함수

정의

예시

INPUT(source,informat)

문자를 숫자로 변환

⇒ Source를 어떻게 읽어 올지를 informat으로 지시

‘3600’ ⇒ 3600

num1 = INPUT('3600', 4.);

 

‘3,600’ ⇒ 3600

num2 = INPUT('3,600', comma5.);

 

‘19600101’ ⇒ 0

numdate=INPUT('19600101',yymmdd8.);

PUT(source,format)

Reformat(숫자를 문자로 변환)

⇒ source에 format을 적용해서 리턴

3600 ⇒ '3600'

char = PUT(3600,4.);

 

0 ⇒ '1960-01-01'

chardate = PUT(0,yymmdd10.);

Version history
Last update:
‎11-11-2021 03:53 AM
Updated by:
Contributors

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Article Labels
Article Tags