473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Use Timer to get time 40mins from now

Is it possible to convert a value from timer into a real
time (HH:MM:SS)? This is what I'm trying to do -

timeIn40mins = timer + 2400
Response.Write "time + 40 = " & timeConvert(timeIn40mins)

But I dont know what timeConvert should be. Alternatively
is there another way of doing this?

TIA,

Colin
Jul 19 '05 #1
4 1423
I've cracked it with TimeSerial:

response.write TimeSerial(hour(time), Minute(time) + 40,
Second(time))
Jul 19 '05 #2
Colin Steadman wrote on 08 jan 2004 in
microsoft.public.inetserver.asp.general:
Is it possible to convert a value from timer into a real
time (HH:MM:SS)? This is what I'm trying to do -

timeIn40mins = timer + 2400
Response.Write "time + 40 = " & timeConvert(timeIn40mins)

But I dont know what timeConvert should be. Alternatively
is there another way of doing this?


<%

ti = DateAdd("n", 40, Now)

function two(x)
two = right("0" & x, 2)
end function

Response.Write two(hour(ti))&":"&two(minute(ti))&":"&two(second(t i))

%>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3
Colin Steadman wrote:
Is it possible to convert a value from timer into a real
time (HH:MM:SS)? This is what I'm trying to do -

timeIn40mins = timer + 2400
Response.Write "time + 40 = " & timeConvert(timeIn40mins)

But I dont know what timeConvert should be. Alternatively
is there another way of doing this?


I'm not clear: do you want the time of day?

Or do you simply want the seconds expressed as H:M:S? IE, 93672 seconds
expressed as 26:01:12?

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #4
> I'm not clear: do you want the time of day?

Or do you simply want the seconds expressed as H:M:S? IE, 93672 seconds
expressed as 26:01:12?

Bob Barrows

Yes, thats what I was after, a time of day (time now + 40 minutes).
This is allows me to warn the user exactly when a certain page will
timeout. That way there is no ambiguity, and if the page does timeout
the user cant say they were not warned.

Regards,

Colin
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually...
1
by: martinm69x | last post by:
Hey all, I've been working on the code for a kernel timer which will report real time, CPU time, user time and kernel time on the operation of fibonacci method. The way im doing it is keeping...
9
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
7
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user...
8
by: Xero | last post by:
Hello. Could anybody suggest a way to create a timer? I want to timer to be displayed to the user, telling he or she how much time has passed. Thanks. -- Xero
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
4
by: Daniel | last post by:
Hey guys Here is what i want to do. I have made a multiplayer game that needs to when more than one player is ready start a countdown that the clients can see, so players can still join in this...
2
by: martin1 | last post by:
All, timer interval is 60 sec, i want ot set up timer start 15 sec later after minute. for example if current time is 2:30:00, the timer starts 2:30:15, then timer loop procedure every minute...
19
by: adi | last post by:
Hi I need the following: at particular times of day, I want to make some processing. System.Windoes.Timer doesn't help much, because it exposes the Interval property. Instead, I need to tell...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.