Real time Timer and time left with count down

Posted on 2008-11-04
Last Modified: 2013-12-17

I need to program a real time timer like Current Golowbids Time at

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.
Question by:techques
    LVL 16

    Expert Comment


    Author Comment

    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?
    LVL 16

    Accepted Solution

    You can use the Timer Component

    For each tick of the Timer you can calculate the time left by using the DateTime.Subtract

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

    Display the diff.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now