Web Hosting Talk







View Full Version : MySQL Date Calculation


overulem
06-24-2005, 08:45 AM
hi,

anyone know how to find the date difference for mysql?

i have created two fields (lastshout,datecreated)

Both of the fields are Date type.

I want to do something like...

if 24-6-2005 minus 24-5-2005

that means it is more than 30 days and i have written a script to delete inactive shoutbox.

thanks

chrisranjana
06-24-2005, 09:19 AM
You can read more about mysql date functions here

http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html

overulem
06-24-2005, 10:29 AM
ummm...

i have actually read that. dont understand the function

can you demonstrate how could i do it?

thanks

overulem
06-24-2005, 10:31 AM
oh,ok

thanks anyway...
i got it :)