<% 'This code is copyrighted. 'This code is provided free of charge. 'You may use or modify this code as you wish, 'we ask that you give us some credits or link to 'our web site. Thank you and enjoy. 'http://www.justcute.com ' *** iEnd must be the date and time in the FUTURE! iDate = NOW() iEnd = #12/25/2002 18:00:00# startDate = iDate targetDate = iEnd Function funcCountDown(startDate, targetDate) zSeconds = DateDiff("s",startDate,targetDate) zSeconds0 = zSeconds xSeconds = zSeconds mod 60 zSeconds = zSeconds - xSeconds zMins = zSeconds\60 xMins = zMins mod 60 zMins = zMins - xMins zHours = zMins\60 xHours = zHours mod 24 zHours = zHours - xHours zDays = zHours\24 'xDays = zDays mod 24 funcCountdown = Array(xSeconds, xMins,xHours, zDays) End Function arrCountDown = funcCountDown(iDate, iEnd) remainSeconds = arrCountDown(0) remainMins = arrCountDown(1) remainHours = arrCountDown(2) remainDays = arrCountDown(3) Response.Write "Now is: " & startDate & "
" Response.Write "Christmas's eve is: " & targetDate & "

" Response.Write "There are " & remainDays & " days " Response.Write remainHours & " hours " Response.Write remainMins & " minutes " Response.Write remainSeconds & " seconds " Response.Write " Until Christmas's eve! " %>