on 11-26-2008 3:19 PM
Hi,
I would like to have a simple query :
select ...
from ...
where lastmoddate between to_date('20080101','YYYYMMDD') AND to_date('20090101','YYYYMMDD')
The function to_date is not exist on MaxDB, Is there any similar function on MaxDB ?
If this kind of function is not exist on MaxDB, How else I can range between ddates ?
Many Thanks,
Ido
Hi Ido
Please try following:
select * from ... where lastmoddate between {d '2008-11-26'} and {d '2008-11-27'}
FYI, there exists besides {d '...'} for date, {t '...'} for time and {ts '...'} for timestamp.
Example:
create table datetest2 (id int, d date)
insert into datetest2 values (1, now())
insert into datetest2 values (2, now())
select * from datetest2 where d between {d '2008-11-26'} and {d '2008-11-27'}
Regards Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thansk Thomas,
Its working.
Your answer was very helpfull.
Best Regards,
Ido
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you try just to say
lastmoddate between '20080101' and '20090101'
?
I think, that should do.
Perhaps '20081231' would be better for the upper limit as it is inclusive.
Elke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.