RE: wildcard date searching

2001-07-13 Thread Chris Bolt

 Hello,
 
 I am still a beginner, but I am trying to learn MySQL.  If you have a 
 date field, and you are using the date field in your where clause, I 
 understand how to use :
 WHERE date=-mm-dd;  I am trying to find out if there is anyway 
 to use the wildcard character %  in dates like you can in text fields.  
 I wanted to be able to say,
 WHERE date=-mm-%% or something to that effect.

WHERE date LIKE -mm-%


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: wildcard date searching

2001-07-13 Thread Dibo Chen

where date like '2001-07%' ... would find all 2001-07-??.

[EMAIL PROTECTED] wrote:
 
 Hello,
 
 I am still a beginner, but I am trying to learn MySQL.  If you have a
 date field, and you are using the date field in your where clause, I
 understand how to use :
 WHERE date=-mm-dd;  I am trying to find out if there is anyway
 to use the wildcard character %  in dates like you can in text fields.
 I wanted to be able to say,
 WHERE date=-mm-%% or something to that effect.  I know that if I
 do:
 WHERE YEAR(date)= and Month(date)=mm
 which will do the same thing, but I was curious if you could do it the
 other way.
 
 Any suggestions would be appreciated.
 
 Thank you for your time,
 Scott Pollak
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: wildcard date searching

2001-07-13 Thread Don Read


On 13-Jul-01 [EMAIL PROTECTED] wrote:
 Hello,
 
 I am still a beginner, but I am trying to learn MySQL.  If you have a 
 date field, and you are using the date field in your where clause, I 
 understand how to use :
 WHERE date=-mm-dd;  I am trying to find out if there is anyway 
 to use the wildcard character %  in dates like you can in text fields.  
 I wanted to be able to say,
 WHERE date=-mm-%% or something to that effect.  I know that if I 
 do:
 WHERE YEAR(date)= and Month(date)=mm
 which will do the same thing, but I was curious if you could do it the 
 other way.
 

Did you try it ?
   ... or where you expecting everyone else to do it for you ?

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php