I have a field in my database which stores the date and time that a record was created. Is there any easy way to take the current date and time and work out to the difference between the two?
SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30'); //Prints 1
See the MySQL DATE and TIME functions HERE
You can use curdate() with datediff to achieve this.
Blu