2000 countdown program implemented with ASP

Source: Internet
Author: User
Tags current time
By using several time functions, you can simply complete the 2000 countdown function on the ASP web page. By changing the parameters of the Cdate function, you can complete the countdown of other dates.
The source code of ASP is as follows:
<B> 2000 countdown! </B> <BR>
'Display current time
The current Time is <% = Time () %> on <% = Date () %>. <BR>
'Calculates the number of days from the specified date.
<% = DateDiff ("d", Now (), Cdate
("00:00:00") %> day! <BR>
'Calculates the number of hours from the specified date.
<% = DateDiff ("h", Now (), Cdate
("00:00:00") %> hour! <BR>
'Calculates the number of minutes from the specified date.
<% = DateDiff ("n", Now (), Cdate
("00:00:00") %> minute! <BR>
'Calculates the number of seconds from the specified date.
<% = DateDiff ("s", Now (), Cdate
("00:00:00") %> seconds! <BR>
The following is the HTML output:
2000 countdown!
The current time is 9:44:34 on 99/11/12.
There are still 50 days from January 1, 2000!
There are still 2000 hours from January 1, 1179!
There are still 2000 minutes from January 1, 70696!
2000 seconds from January 1, 4241726!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.