View Full Version : mysql date operation problem??

01-15-2007, 11:03 AM
I am trying to display all the news which are up to todays date. I have used following query but didnt get the success

$sql = "SELECT * FROM news WHERE news_date < = todays_date";

May be i have not enough knowledge about date operation in mysql. What i want is just your help .
Thanks a lot.

01-15-2007, 06:19 PM
Did you look at Date and Time functions in the mysql manual to see how to do what you wanted?

03-12-2007, 11:21 AM
is there anyway to find the the week from yyyy-mm-dd format using mysql ?

03-12-2007, 02:31 PM
select week(yourdatecolumn)

03-13-2007, 06:07 AM
Pardon again .i was not clear in my question
Suppose what should i do if i would like to find the week on month of 2007-03-12 and the answer should be 2nd ie 2...
thanks again