Forums

This topic is locked

calculating with time (hours)

Posted 08 Nov 2002 18:11:19
1
has voted
08 Nov 2002 18:11:19 Matthijs Horsman posted:
Hello All,

I have the following problem using ASP/VBSCRIPT/IIS/DWMX:

I want to add to values like 0:30 and 0:45. These represent an half our and three quarters of an hour. So if you add them togheter it shoul be 1:15 (one hour and fifteen minutes) anybody got any idea how to handle this??

Tried all sorts of VBscript functions ( like <% hour(time) %> ) but nothing seems to work...

Or maybe a way to convert a string to a numeric value so i can use something like this

<%
dim x, y
x = session("a"
y = session("b"

total = x + y
%>

<% = (total) %>

if the session in this case were 1 and 2 a just get 1 and 2 instead of 3

Hope somebody can help with this problem, would be great...

Matthijs

Matthijs
----------------
DWMX/W-XP-PRO/IIS/ASP-VB/MS-SQL

Replies

Replied 08 Nov 2002 22:11:32
08 Nov 2002 22:11:32 Brent Colflesh replied:
Dear Matthijs,
A DateDiff() example at:

www.scriptmate.com/resources/articles/article.asp?id=13

Regards,
Brent

Reply to this topic