Re: Retrieve the month from a date field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shaun,

I suppose that type of date filed is `DATE` or `DATETIME`.
This is sample SQL code for MySQL:

SELECT * FROM TableName WHERE (MONTH(DateField) = 4)

________________________

Best regards,
 Nenad Djordjevic                           mailto:nenad@diyomisoft.com
   
   Diyomi Soft
   http://www.diyomisoft.com/


Wednesday, April 9, 2003, 1:20:21 PM, you wrote:

s> Hi,

s> I have a date field in my table (YYYY-MM-DD). Is it possible to retrieve all
s> the rows that occur in a given month i.e. April?

s> Thanks for your help


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux