Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
Hi Peter,
you can use TO_DATE function like below:
WHERE CALL_DATE = TO_DATE('$(vToday)', 'DD/MM/YYYY HH:MI:SS');