By: Rhino

A simple countdown from a distant date to now. Using the #datediff()# function and the CreateDate function. The first part means "d" for how many days, Now() means the time date right now, then CreateDate turns the numbers in the () into a date using the format (year,month,day).

Simply enclose it in # # and put it between CFoutputs.

<cfoutput>
   #DateDiff("d", Now(), CreateDate(2003,9,11))# days til the 9/11 2 year anniversary.
</cfoutput>

About This Tutorial
Author: Rhino
Skill Level: Beginner 
 
 
 
Platforms Tested: CF5
Total Views: 38,702
Submission Date: December 13, 2002
Last Update Date: June 05, 2009
All Tutorials By This Autor: 10
Discuss This Tutorial
  • How would you calculate a countdown by days, hours, minutes, and seconds? Thanks!

Advertisement

Sponsored By...
Powered By...