View Single Post
  #1  
Old 05-23-2007, 03:05 AM
richa richa is offline
Junior Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
richa is on a distinguished road
Default finding data submission date?

Hi everyone,
I have one column in my main table that has the date formatted as mm-dd-yyyy. This is the date that a user has inputted data last, and they may do so only once daily. How can I write a query taking now() OR curdate() and subtracting max(date) to find out how many days it has been since the user has last submitted data? I end up getting a NULL set.

SELECT datediff((now(),'%m-%d-%Y'),max(date)) from foo

Looking for your reply guys.
Thank you in advance! -- 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
  #1  
Old 05-23-2007, 03:05 AM
richa richa is offline
Junior Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
richa is on a distinguished road
Default finding data submission date?

Hi everyone,
I have one column in my main table that has the date formatted as mm-dd-yyyy. This is the date that a user has inputted data last, and they may do so only once daily. How can I write a query taking now() OR curdate() and subtracting max(date) to find out how many days it has been since the user has last submitted data? I end up getting a NULL set.

SELECT datediff((now(),'%m-%d-%Y'),max(date)) from foo

Looking for your reply guys.
Thank you in advance! -- 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