954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

less than 14 days

how can i select all records from a table where a future date column is less than 14 days away within a php table.

somthing similar to?

SELECT DISTINCT FROM table WHERE 'Date_Column' <14 days


Thanx In Advance
KeeF

JukesK
Newbie Poster
15 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

SELECT DISTINCT * FROM table WHERE date_add(`Date_Column`, interval 14 day) < now()

smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
 
SELECT DISTINCT * FROM table WHERE date_add(`Date_Column`, interval 14 day) < now()

works a treat!! Many thanks

JukesK
Newbie Poster
15 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: