Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ODBC Connect - convert timestamp to date

Hi,

I am trying to write an app that will pull data from a source system (but only for the current date) and save it.

I am experiencing difficulty in filtering for today's date only as the date field in the data is a timestamp.

Please take a look at my code below and help me out if possible.

Many thanks.

Let vToday = Date(Today(), 'YYYYMMDD');

ODBC CONNECT TO [conv_bil;DBQ=BILLING ] (XUserId is XXXXXXX, XPassword is XXXXXXX);

VOC_CALL_LOG:

SQL SELECT

    BCC_SUB_NO,

    CALL_DATE,

    CALL_REASON,

    CALL_REASON_DETAILS,

    CALL_RECEIVER,

    ID,

    NOTES

FROM "CONV_BIL"."CALL_LOG_FEED"

WHERE CALL_DATE = vToday;

STORE VOC_CALL_LOG into ;

DROP TABLE VOC_CALL_LOG_FEED;

1 Reply
jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi Peter,

you can use TO_DATE function like below:

WHERE CALL_DATE = TO_DATE('$(vToday)', 'DD/MM/YYYY HH:MI:SS');