Date and SQL statement
I need to do a search where I am looking at the table that has dates and I need to look only things that are 30 days or younger. Can so one show me a some SQL statements where you use , ? And the key for equal to or less? Chuck Payne Magi Design - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Date and SQL statement
On Wednesday, 20. March 2002 18:31, Chuck PUP Payne wrote: Hi! I need to do a search where I am looking at the table that has dates and I need to look only things that are 30 days or younger. Can so one show me a some SQL statements where you use , ? And the key for equal to or less? SELECT columns FROM table WHERE date DATESUB(CURDATE(), INTERVAL 30 DAY); For a detailed description see: http://www.mysql.com/doc/D/a/Date_and_time_functions.html Regards Georg (mysql, query) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Date and SQL statement
select * from accounts where duedate=convert(float,getdate()) - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 12:31 PM Subject: Date and SQL statement I need to do a search where I am looking at the table that has dates and I need to look only things that are 30 days or younger. Can so one show me a some SQL statements where you use , ? And the key for equal to or less? Chuck Payne Magi Design - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php