导入的Teradata日期作为字符(1/1/17)进入SAS - 如何转换为SAS date9。

时间:2017-03-08 17:21:10

标签: date sas teradata

这是我从teradata导入的方式:

libname DDWP_PLT teradata 
        user='xxxx'
        password='xxxx' 
        schema='DDWP_PLT_V' 
        server='phxtdpd2cop1.directv.com' 
        FASTEXPORT=YES; 

PROC SQL; 
    create table mob_base as 
    select ctn
         , ban
         , intrxn_id
         , sasdate
         , start_time
         , sessionstarttime
         , agent_ID
         , work_group as agent_skill
         , tasktype
         , taskresolution
         , need
         , need2
         , need3
         , disposition
         , note 
    from ddwp_plt.ATT_MOBILITY_CLARIFY_DTL_VW 
    where start_time between '2016-12-29 00:00:00' and '2017-01-31 23:59:59' 
    and start_time = sessionstarttime
    order by ctn
           , sessionstarttime 
    ;
QUIT;

我是否需要先将其设为数字​​,然后将其变为日期?

我试过了:

format=date9.
INPUT(CATS(t1.column),BEST.)
Char = char X 1

这些都导致没有输出

0 个答案:

没有答案