How to countdown to a date in MySQL

Thread Solved

Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

How to countdown to a date in MySQL

 
0
  #1
Nov 23rd, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,162
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 138
dickersonka dickersonka is offline Offline
Veteran Poster

Re: How to countdown to a date in MySQL

 
1
  #2
Nov 23rd, 2008
  1. SELECT DATEDIFF(NOW(), '2008-12-25)
  2.  
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

Re: How to countdown to a date in MySQL

 
0
  #3
Nov 26th, 2008
Originally Posted by dickersonka View Post
  1. SELECT DATEDIFF(NOW(), '2008-12-25)
  2.  
Perfect!!! Thanks!!! (^ - ^)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum


Views: 815 | Replies: 2
Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC