Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to QLikView. I need to load data from a txt file and put a condition 'where' on the date. The field INV_DATE is in format 2-7-2010 0:00:00. So when I try to edit script after load code it doesnt give me desired results.
WHERE
WHERE
WHERE
INV_DATE > '01-01-2009 0:00:00'
I have tried all possible combinations but I am not able to get results. Please help.
Abhishek
Ok tell me from which data source ur getting this data. I mean either from sql or txt or excel or qvd file etc.
txt file
Hello,
I've taken txt file and it is working fine for me. Please check txt file and qvw file once again.
Weird it is.
You know I took your text file. Created a new qlikview file and loaded text file. and the codes do not work for me.
Attaching files for your reference.
thanks for all your efforts, Abhishek
Hi,
Try this script
Directory;
LOAD CUSTOMER_NAME,
INV_DATE
FROM
Temptxt.txt
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
Where Date(Date#(INV_DATE,'M-D-YYYY hh:mm:ss')) > Date(Date#('1-1-2010 00:00:00', 'M-D-YYYY hh:mm:ss'))
;
Hope it helps you.
Regards,
Jagan.
Use this code:
Directory;
LOAD CUSTOMER_NAME,
INV_DATE
FROM
Temptxt.txt
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
Where Timestamp(Timestamp#(INV_DATE,'MM-DD-YYYY hh:mm:ss')) > Timestamp(Timestamp#('1-1-2010 00:00:00', 'M-D-YYYY hh:mm:ss'))
;
- If you attach sample file with sample data what you have, it helps others to solve the problem quickly. It saves ur's and others time also.
Cheers!!
Jagan
Thanks a lott Jagan. It works!!!!!
and I apologise for takign up your time. I will keep in mind in future to load files.
Thanks a ton, Abhishek
Hi Jagan,
I have loaded the data succesfully. What I need to do as a next step, give user an option on the tool to give a date range and see the output for that date range. The date range will be in DDMMYYYY format.
How to do this.
Please help, Abhishek