Real time Timer and time left with count down

Hi

I need to program a real time timer like Current Golowbids Time at http://www.golowbids.com/featuredauction.php

The date and time is real time.

Secondly, Time Left is the count down from the END datetime.

I use repeater to get the end datetime from MSSQL.

<%# DataBinder.Eval(Container.DataItem, "enddatetime") %>

How should I make the count down with day, hour, min, second?

Thanks for advice.
techquesAsked:
Who is Participating?
 
CuteBugConnect With a Mentor Commented:
You can use the Timer Component
http://asp.net/AJAX/Documentation/Live/tutorials/IntroToTimerControl.aspx

For each tick of the Timer you can calculate the time left by using the DateTime.Subtract
http://msdn.microsoft.com/en-us/library/8ysw4sby.aspx

e.g. DateTime EndDate = new DateTime(2008, 11, 7, 22, 15, 0);
DateTime diff = EndDate.Subtract(DateTime.Now);

Display the diff.
0
 
CuteBugCommented:
0
 
techquesAuthor Commented:
how can the timer run itself? and how should I program the count down in comparing with the end datetime?  Is there any online tutorial or sample code? Is it javascript?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.