Page 1 of 1

Filter stage date condition

Posted: Tue Oct 12, 2010 1:22 pm
by kpsita
Hi,

I have a requirement where DATE_FIELD is between Date1 and Date2. For this I am using the following function in filter stage.
DATE_FIELD >= Date1 AND DATE_FIELD <= Date2

All my fields are from database with Data (10) in the format YYYY-MM-DD. I wanted to know if the function used in FILTER stage is correct, or should I use transformer to first convert into YYYYMMDD and then use contraint to check the condition.

i tested and looks like working fine with the filter stage, but wnated to make sure if the function used is correct.

thanks

Posted: Tue Oct 12, 2010 1:26 pm
by anbu
If your date is in the format YYYY-MM-DD, then you are fine with your condition in Filter stage.

Posted: Thu Oct 21, 2010 5:50 am
by sridinesh2009
If your source is database...
better you can write a query for fetching records of that range.. from database

Posted: Thu Oct 21, 2010 7:24 am
by chulett
I don't know if it is "better" or not, but if their requirement is to do it "in job" then as anbu noted (with the caveat regarding their string format) what they are doing is just fine - dashes or no dashes.