unruhtech wrote:
>the following works:
>SELECT to_days( curdate() + 0 ) , to_days( curdate() + 3 ) FROM table
>732033 732036
>
>but this does not:
>SELECT to_days( curdate() + 0 ) , to_days( curdate() + 4 ) FROM table
>732033 NULL
>
>an end of month problem or a curdate() problem or what?
>
>curdate( ) + 0, curdate( ) + 7
>20040328 20040335
>
>no month i know of has 35 days in it.
>
>3.23.58 on red hat 7.3
>
>Steve
>
>p.s. any tips for a query on today and today +7 days?
>
>
>
You can't simply go:
curdate() + x
like you are trying to, as curdate() returns an integer, and your '+ x'
adds one to it. Use a date addition function.
Dan
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@stripped
website: http://www.nusconsulting.com.au