View Full Version : need a timer from a specific date and time

09-24-2005, 12:23 AM
Hello, I'm new to ASP, and I'm making a web page for my son... He was born on september 15th 2005, at 3:04 EST. (9/15/05) I want to have a spot on the bottom of the page that says... "I'm xx hours, xx minutes, and xx seconds old"

if anyone could help me with this that would be awesome!!!!


09-27-2005, 02:19 PM
This will give you the difference in seconds. Then you can manipulate the variable to break it down into hours, minutes and seconds.

Dim dBirth, tDiff
dBirth = CDate("9/15/2005 3:04 PM")
tDiff = datediff("s", dBirth, Now())
Response.Write "<p>I am " & tDiff & " seconds old.</p>"