View Single Post
  #2 (permalink)  
Old 12-25-2007, 09:59 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,172
Last Blog:
Ext JS or Ext GWT
Credits: 1
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

I don't see any reason why that shouldn't work but you should use DATEDIFF() to subtract two dates:

Code:
SELECT username, NOW(), date_registered, DATEDIFF(NOW(), date_registered) AS diff FROM users
MySQL AB :: MySQL 5.0 Reference Manual :: 10.6 Date and Time Functions
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Reply With Quote