Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date range not working

Hi

I'm putting this into my script but its not returning the data I expect, what am I doing wrong?

WHERE

DateRaised>='01/06/2010' and DateRaised<'31/05/2011';


Thanks

3 Replies
swuehl
MVP
MVP

Hi,

I think you have to take care that your literal date format (i.e. '01/06/2010') matches exactly the format which is expected by your SQL Select or LOAD statement.

Regards,

Stefan

Not applicable
Author

Hi,

Try this

WHERE

DateRaised>=DATE('01/06/2010', 'DD/MM/YYYY') and DateRaised<DATE('31/05/2011', 'DD/MM/YYYY');

Verify if your field "DateRaised" are just DATE or DATETIME.

If DATETIME you can do this:

WHERE

DayStart(DateRaised) >= DATE('01/06/2010', 'DD/MM/YYYY') and DayStart(DateRaised) < DATE('31/05/2011', 'DD/MM/YYYY');

danielrozental
Master II
Master II

function Date doesn't create a Date field, it only formats one.

Are you sure field DateRaised is being recognized as a date field? are values aligned to the right when you select that field in qlikview?