Bluehost.com Web Hosting $6.95

Count number of days between now and future date.

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() ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-02-2007
sorensong@gmail.com
 
Posts: n/a
Default Count number of days between now and future date.

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.

Reply With Quote
  #2 (permalink)  
Old 03-02-2007
sorensong@gmail.com
 
Posts: n/a
Default Re: Count number of days between now and future date.

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()

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:16 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0