I'm tiring   (all right, all right  -- I mean I'm getting tired!).   This
worked:

SELECT `order_date`
FROM `orders`
WHERE to_days( '2001-01-01' ) - to_days( `order_date` ) <= 365

It needed both the quotes (thanks Howard) and the right operator <=.    I
progress...   as through treacle...   but I progress.   Thanks, too, Rudy
for keeping an eye on me.

Joseph
(pretty colours, aren't they?)


> In MySQL, date values need quotes around them.
>
> At 04:51 PM 3/15/2004, Smile-Poet wrote:
> >Right - I have converted
> >WHERE datepart(yy, order_date) = 2001
> >
> >(after much searching) to
> >
> >to_days(2001-01-01)-to_days(order_date) <=365.  (I've tried both <= and
>=)
>
> try: to_days('2001-01-01')-to_days(order_date) <=365
>
>
> ____ . The WDVL Discussion List from WDVL.COM . ____
> To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
>        Send Your Posts To: [EMAIL PROTECTED]
> To set a personal password send an email to [EMAIL PROTECTED] with the
words: "set WDVLTALK pw=yourpassword" in the body of the email.
> To change subscription settings to the wdvltalk digest version:
>     http://wdvl.internet.com/WDVL/Forum/#sub
>
> ________________  http://www.wdvl.com  _______________________
>
> You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to %%email.unsub%%
>
> To unsubscribe via postal mail, please contact us at:
> Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
>
> Please include the email address which you have been contacted with.
>


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set 
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to