Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2007, 09:45 AM
Registered User
 
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Create a countdown timer

Hi
I am Creating an online auction for my project. I was wondering how i would create a countdown timer. for example on ebay.

aalahi
 
Old February 14th, 2007, 10:30 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Thats simple. When you insert an auction into the database the user will be able to specific the end date (I assume) so when you insert the record you will have a field that contains the date the auction was posted (lets call it begin date) and you will have a field that determines when the auction ends (call it end date)

For the countdown part this can be done through SQL

SELECT DateDiff(beginDate, getDate()) From <table> where auctionID = <value>

You could then, either in SQL or .NET code, write logic to determine if the auction is over e.g. if getDate() >= endDate then the auction is over.

hth

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Countdown timer DennyLoi Javascript How-To 2 November 27th, 2007 08:01 AM
Countdown Timer stalkingbutler Access VBA 2 April 16th, 2007 10:44 AM
Countdown timer ashik112 Classic ASP Basics 1 February 25th, 2007 07:09 PM
Countdown Timer loveperson Beginning VB 6 1 January 7th, 2005 05:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.