On 6/28/05, Joseph Harris <[EMAIL PROTECTED]> wrote: > Returning to my question and rudy's reply about extracting specific month > and day from tables, irrespective of the year, I cannot see how this is to > be done without setting separate columns for year, month and day; so one > can query ...WHERE month is 02 AND day is 03... or whatever. > > I've read up the mysql manual and I can't see any function to extract rows > with a particular month from Date, Datetime or Timestamp. Obviously I'm > thinking about anniversaries, but only about how many there are on a > particular day - the year is not wanted for this.
SELECT somedate FROM foo WHERE DAY(somedate)=2 AND MONTH(somedate)=03; http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. ____ The WDVL Discussion List from WDVL.COM ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: [email protected] To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: '' 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.
