This is a discussion on Count number of days between now and future date. within the MySQL Database forums, part of the Database Forums category; I've been trying all morning to figure out a way to display the number of days/months between CURDATE() ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've been trying all morning to figure out a way to display the number
of days/months between CURDATE() and a future date (myqsl column). I've tried BETWEEN and something like this: SUBDATE(CURDATE(), MAX(stopdate) AND NOW()) AS time_left I guess trick is converting a date format to a number format. I don't know, I'm lost! Any guidance in the right direction would be GREATLY appreciated. Thanks a lot. |
|
|||
|
On Mar 2, 1:16 pm, sorens...@gmail.com wrote:
> I've been trying all morning to figure out a way to display the number > of days/months between CURDATE() and a future date (myqsl column). > I've tried BETWEEN and something like this: > > SUBDATE(CURDATE(), MAX(stopdate) AND NOW()) AS time_left > > I guess trick is converting a date format to a number format. I don't > know, I'm lost! > > Any guidance in the right direction would be GREATLY appreciated. > Thanks a lot. Got it- DATEDIFF() |