This topic is locked

SQL Date help needed

12/23/2008 7:29:32 AM
PHPRunner General questions
L
Lisa2006 author

Hi Forum,
I need to amend my "Edit SQL query" to only display records where the current date is less than or equal to the date held in field "deliverydate".
i.e,
Field: deliverydate = "30/12/08"
If todays date is between 23/12/08 and 30/12/08 display record.

If todays date is 31/12/08 or after then do not display record.
Thanks in Advance
Lisa

J
Jane 12/23/2008

Hi,
here is a sample:

where deliverydate>=CURDATE()



More info here:

http://dev.mysql.com/doc/refman/5.0/en/dat...unction_curdate

L
Lisa2006 author 12/23/2008

Hi,

here is a sample:
More info here:

http://dev.mysql.com/doc/refman/5.0/en/dat...unction_curdate


Thanks Jane
I managed to solve the problem using a different technique:
WHERE DateDiff(now(), table.deliverydate)<=0
Appears to work.
Lisa