Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have one field called Date in source file having data from 01-APR-2012 to 31-JUN-2012 with the same formats in these data i want to seperate from 01-MAY-2012 to 31-MAY-2012 by using script and in this data i want to convert "MAY" to 06 can anyone help on this
What exactly do you want to end up with?? It sounds like you want a list of dates with mixed formatting and where the month is May (the 5th month) to show it as 06. Is this right!?
Hi Jason,
Thanks for your reply
i have data in the "Date" field from 01-APR-2012 to 31-JUN-2012 in the Source file
My Requirements:
1) I want to seperate the data from the above data '01-MAY-2012' to '31-MAY-2012' by using script.
2) After Getting the May data i need to Populate the data in different field 05 Instead of MAY from the date field.
Thanks,
Pavan
I'm sorry Pavan but I still don't understand. If you post an example of how your data looks now and how you want it to look at the end then I can help further.
Jason
Hi Pavan,
I assume, you would like to load the data only for the month of May and want extract the date from the date field. if so below is the code.
Load *,
Date(Date#(DateField,' DD-MMM-YYYY')) DateNor,
Num(Month(Date#(DateField,' DD-MMM-YYYY')),'00') as MonthNum,
Day(Date#(DateField,' DD-MMM-YYYY')) as Day,
Year(Date#(DateField,' DD-MMM-YYYY')) as Year
From Table where MonthName(Date#(DateField,' DD-MMM-YYYY')) = 'May 2012';
Hope this helps you.
-Sridhar
Hi ,
Thanks for your Sridhar , I tried your code its not working for me i am giving example can you check and give me an example
i have one txt file with the fields called A,B,C and D
A B C D
x y z 01-APR-2012
c v b 01-MAY-2012
w e r 24-MAY-2012
t y c 31-MAY-2012
r y u 15-JUN-2012
I want to load this text file in to Qlikview and i need to present only may data in Qlikview by using date filters in the script.
I have tried like below but its not working.
Load
a,
b,
c,
d
From sample.txt
Where D >= '01-MAY-2012 and D<= '31-MAY-2012';
Can you suggest me how to write scripting code
Hi,
Attached is an example for your query.
Hope this helps.
-Sridhar
Hi Sridhar,
Thanks alot Sridhar it works for me i am new to qlikview can you suggest me how to learn qlikview ASAP.
Thanks,
Pavan