|
|
 |
Re: FN-FORUM: SQL Help (probably an easy one)
date posted 15th January 2007 22:20
[EMAIL REMOVED] wrote:
>
>
> Dear Forum
>
> What is the correct query to select all the results in my SQL database table
> (newmenudata) which are in the month of January from a column with a UNIX
> TIMESTAMP (timeadded)?
>
> Here is my effort:
>
> SELECT * FROM newmenudata WHERE UNIX_TIMESTAMP (timeadded, '%M') = 'January' ;
>
> Not working any help appreciated!!
SELECT *
FROM newmenudata
WHERE DATE_FORMAT(timeadded, '%b) = 'Jan'
Or something very similar.
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
Dave...
|
 |
|