I wanted to find out the no: of days elapsed since it was entered
select DATE_FORMAT(now()-20040807111937,"%D")
returns NULL.
I know DATE_SUB can be used but I was just wondering why this is returning null when now()-20040807111937 is returning a no:
Any Ideas ?
Thanks
Time Difference
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
try using one of the diff or timestamp functions: http://dev.mysql.com/doc/mysql/en/Date_ ... tions.html