Using several time functions, the program can simply complete the function of 2000 rewind in ASP Web pages, and change the parameters of CDate function to finish the other date.
The ASP source code is as follows:
< B >2000 Year Rewind!</II >< BR >
' Show Current time
The current time is <%= times ()% > on <%= Date ()% >.< BR >
' Calculate the number of days to display from a specified date
From 2000 there are <%= DateDiff ("D", now (), Cdate
("01/01/2000-00:00:00") % > Days! < BR >
' Calculates the number of hours displayed from a specified date
From 2000 there are <%= DateDiff ("H", now (), Cdate
("01/01/2000-00:00:00") % > H!< BR >
' Calculate the number of minutes from the specified date
From 2000 there are <%= DateDiff ("N", Now (), Cdate
("01/01/2000-00:00:00") % > Min!< BR >
' Calculates the number of seconds to display from a specified date
From 2000 there are <%= DateDiff ("s", Now (), Cdate
("01/01/2000-00:00:00") % > Sec!< BR >
The following is the HTML output:
2000 is a time to remember!
The current time is PM 9:44:34 on 99/11/12.
It's 50 days from 2000!
It's 1179 hours from 2000!
It's 70,696 minutes from 2000!
It's 4,241,726 seconds from 2000!