New related comments
Number of comments in the last 48 hours
Location of mysql startup script
Best operating system settings for mysql throughput
Monitoring mysql status
Compare 2 dates in mysql
4 comments. Current rating: (1 votes). Leave comments and/ or rate it.
Question:I need to compare 2 dates in mysql but I only have version 3.23 of mysql installed and cannot upgrade.
Answer:With mysql 4.1.1 the function datediff(date1,date2) and others were introduced.
If you are using 4.0 or older, you need to use to_days(date1) and subtract in this form: