943,960 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 1550
  • MySQL RSS
Nov 23rd, 2008
0

How to countdown to a date in MySQL

Expand Post »
I was wondering how do you countdown to a given date, like for and enevnt or something.
Let's say you know the target date is let's say Christmas and you have the current date, how do I calculate how many days are between them?
Similar Threads
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
CodeBoy101 is offline Offline
71 posts
since Dec 2007
Nov 23rd, 2008
1

Re: How to countdown to a date in MySQL

MySQL Syntax (Toggle Plain Text)
  1. SELECT DATEDIFF(NOW(), '2008-12-25)
  2.  
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Nov 26th, 2008
0

Re: How to countdown to a date in MySQL

MySQL Syntax (Toggle Plain Text)
  1. SELECT DATEDIFF(NOW(), '2008-12-25)
  2.  
Perfect!!! Thanks!!! (^ - ^)
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
CodeBoy101 is offline Offline
71 posts
since Dec 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: update in steps? is it possible ?
Next Thread in MySQL Forum Timeline: query to find closest





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC