Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I've date like this:
CaptureDateTime
2011-11-30 05:046:57.997000000
2011-10-30 05:047:57.297000000
2011-09-30 05:048:57.397000000
2011-08-30 05:049:57.497000000
I'm trying this code it is not working. It retrives the empty data can any one help me on this.
LOAD CaptureDateTime
FROM
$(vDataPath)*.txt
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
Where
Date(CaptureDateTime,'MM/DD/YYYY') < Date(AddMonths(Today(),-12),'MM/DD/YYYY');
Hello,
your date converts are false (your format string differs from the content of your file)
and unnecessary (qlikview identify the data as timestamp)
Example: Load all from the last 12 month
test:
load *,
Date(left(CaptureDateTime,10),'YYYY-MM-DD') as convertExample
inline [CaptureDateTime
2011-11-30 05:046:57.997000000
2011-10-30 05:047:57.297000000
2011-09-30 05:048:57.397000000
2011-08-30 05:049:57.497000000
]
where CaptureDateTime > addmonths(today(),-12);
Hi,
Your condition Date(AddMonths(Today(),-12),'MM/DD/YYYY') returns '12/02/2010'. In the data all date values are greater than the '12/02/2010', that's why you are not getting any records.
Check your condition once again and try.
Regards,
jagan.
Sorry for the late..Ya what you said is right. After doing long period of testing i realized dat and I made myself correction on it. Anyway thanks for your help.