I am trying with MySQL 4.1.1 (alpha) to produce a 'Age' field like so:
select=TIMEDIFF(NOW(),`modified`) AS `age`,`name`,`caption`,`modified`
Currently, this works...it reports back the number of hours old the last modification took place.
I want to go a step further and have it report back *days* old. I tried using DATE_FORMAT() but that won't work. What do I need to use, in terms of a SQL function that will allow me to do this conversion?
TIA
=============================
Sean Shrum
Shrum Consulting
C.A.T.S.: Consulting: Programming: R/C Soaring:
select=TIMEDIFF(NOW(),`modified`) AS `age`,`name`,`caption`,`modified`
Currently, this works...it reports back the number of hours old the last modification took place.
I want to go a step further and have it report back *days* old. I tried using DATE_FORMAT() but that won't work. What do I need to use, in terms of a SQL function that will allow me to do this conversion?
TIA
=============================
Sean Shrum
Shrum Consulting
C.A.T.S.: Consulting: Programming: R/C Soaring: