asapfergz08
asapfergz08

Reputation: 1

convert Timestamp to Date in JSL Scripting

I am trying to run a SQL Statement in JSL, but the statement includes a column with datetime, i do not need datetime but simply date. JSL does not like "cast for some reason" can someone please assist

Open Database(
        "DSN=EDWPROD; UID=" || ID || ";PWD=" || PASS || ";MODE=SHARE;DBALIAS=EDWPROD;",
        "SELECT  distinct Cast(TRXN_TS as date) as Trans_Date
    FROM    pODSCFAView.IMP_DBT_AUTHZN_POST_VW
    where Cast(TRXN_TS as date) as Trans_Date between (current_date - 16 day) and (current_date - 3 day) 
    WITH UR");

Upvotes: 0

Views: 845

Answers (0)

Related Questions