adding 10 minutes to the system time

Posted on 2001-08-22
Last Modified: 2010-07-27
hi, i get the system time by using the time funktion.
now my problem is, how i can add 10 minutes to the saved time.
the time format is 'hh:mm:ss'
how do i add the minutes???
thx in advance
Question by:newbie0815
LVL 15

Expert Comment

ID: 6412836
Hi, newbie0815

    Dim newdate As Date
    newdate = DateAdd("n", 10, Now)
    MsgBox newdate
LVL 51

Expert Comment

by:Ryan Chong
ID: 6412838
Hi newbie0815,

Use the TimeSerial Function from VB6
LVL 51

Expert Comment

by:Ryan Chong
ID: 6412847

Dim myDate As Date
    myDate = TimeSerial(Hour(Time), Minute(Time) + 10, Second(Time))
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

LVL 22

Accepted Solution

ture earned 50 total points
ID: 6412940

Here's yet another approach:

Dim d As Date
d = Time + TimeValue("00:10:00")

Ture Magnusson
Karlstad, Sweden

Expert Comment

ID: 6413438
Yet another way of doing it, as dates are stored as number of days, we can add 10 minutes as a fraction of a day:

d=Time + 10/60/24

Author Comment

ID: 6419778
thx to all of u!
LVL 15

Expert Comment

ID: 6419861
  B grade <> "Thanks"

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Paint/Redraw window while dragging 16 83
bit defender blocks good applications 2 101
vb6 connector to mongodb 2 122
VB6 - Convert HH:MM into Decimal 8 63
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question