Codefixer - ASP tutorials, resources and software
ASP.NET 3.5 Hosting – Click Here!
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Friday 9 May
MembersPro PayPal - ASP Membership software

ASP.NET 3.5 Hosting – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

ASP Countdown Script

Using the DateDiff VBScript function we can create a countdown to a particular date. Our code below uses the date 2010 to tell us the number of months, days, hours, minutes and seconds to go.

<%
Response.write DateDiff("m","2010",Now()) & " Months<br>"
Response.write DateDiff("d","2010",Now()) & " days<br>"
Response.write DateDiff("h","2010",Now()) & " hours<br>"
Response.write DateDiff("n","2010",Now()) & " Minutes<br>"
Response.write DateDiff("s","2010",Now()) & " seconds<br>"
%>

Here's our script in action:
1234 Months
37567 days
901625 hours
54097502 Minutes
3245850157 seconds

Read more on the DateDiff function



LinksPro - Directory  and Link  Management Software




If you have any code snippets to share with full credit given then send an email to Codesnippets - You'll receive full credit and a link back to your site.

ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software