View Single Post
  #2  
Old 05-23-2007, 07:16 AM
Yadira Yadira is offline
Senior Member
 
Join Date: Jul 2006
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 17
Yadira is on a distinguished road
Default Re: finding data submission date?

If it is a MySQL DATE column, it does not store values as month-day-year. In a proper RDBMS, how date values are stored is of zero concern to anyone writing queries to them. So if the column is named `date`, you can simply write

SELECT DATEDIFF( NOW(), date ) FROM tbl;

Hopefully it will help you. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - finding data submission date?
View Single Post
  #2  
Old 05-23-2007, 07:16 AM
Yadira Yadira is offline
Senior Member
 
Join Date: Jul 2006
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 17
Yadira is on a distinguished road
Default Re: finding data submission date?

If it is a MySQL DATE column, it does not store values as month-day-year. In a proper RDBMS, how date values are stored is of zero concern to anyone writing queries to them. So if the column is named `date`, you can simply write

SELECT DATEDIFF( NOW(), date ) FROM tbl;

Hopefully it will help you. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote