Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Date Filter in Qlikview Script

I'm trying to pull some data from an Oracle database using date filter, but I'm not avble to do so in Qlikview Script window. Date Format in Source Database is "3/25/2012 11:07:00 AM". I want to pull  all records from 1st Jan 2013. Please advise..........

SQL: SELECT "ACK_DATE","BOX_NO","BOX_SHIP_DATE",FROM "ABC_DB"."ORDER_DETAIL" Where "ENTRY_DATE">= '1/1/2013 00:01:00 AM';

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You probably have to use the to_date() function to create a date from the string:

SELECT "ACK_DATE","BOX_NO","BOX_SHIP_DATE" FROM "ABC_DB"."ORDER_DETAIL" Where "ENTRY_DATE">= to_date('1/1/2013 00:01:00 AM','M/D/YYYY hh:mi:ss AM');


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

You probably have to use the to_date() function to create a date from the string:

SELECT "ACK_DATE","BOX_NO","BOX_SHIP_DATE" FROM "ABC_DB"."ORDER_DETAIL" Where "ENTRY_DATE">= to_date('1/1/2013 00:01:00 AM','M/D/YYYY hh:mi:ss AM');


talk is cheap, supply exceeds demand
eddysanchez
Partner - Creator
Partner - Creator

After the SQL statement the SELECT sentence is compiled for the provider (Oracle)

So you need to do something like that:

SQL SELECT ACK_DATE,BOX_NO,BOX_SHIP_DATE

FROM ABC_DB.ORDER_DETAIL

Where ENTRY_DATE>= '20130101';

Not applicable
Author

Hi Eddy, tried your sujjestions but I'm getting an error message:

"SQL##f - SqlState: S1000, ErrorCode: 1861, ErrorMsg: [Oracle][ODBC][Ora]ORA-01861: literal does not match format string"

Not applicable
Author

I get this error Message:

"SQL##f - SqlState: S1000, ErrorCode: 1821, ErrorMsg: [Oracle][ODBC][Ora]ORA-01821: date format not recognized"

Not applicable
Author

Hi All, tried the below mentioned format and its working Now:

* Where ENTRY_DATE>= TO_DATE('2013-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS')