Help! I am having problems with calculating the total seconds from two date/times.

T

Tim

I need to get the number of seconds when subtracting two date/times.
With the code I am using below I subtract the two date/times and end
up with a total of days like "1.56". Then when I multiply it to get
the number of seconds I am not getting an accurate number. I should
only have whole numbers of seconds with nothing past the decimal
point. I would like to be able to subtract the two date/times and get
the number of seconds without multiplying to get it. Is this possible?
Does anyone have a better more accurate way to do this?

(Below the value of TTClose will be the number of seconds between the
two date/time stamps.)

SQL = "Select * From Table1 WHERE TrackNumber = '" &
Request.QueryString("MSGNUM") & "'"
Set RS = Conn.Execute (SQL)
DetectionTime=RS("DetectionTime")
RS.Close

MyTime=Now()

TClose=(MyTime)-(DetectionTime)
TTClose=(((TClose*24)*60)*60)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top