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 50

Expert Comment

by:Ryan Chong
ID: 6412838
Hi newbie0815,

Use the TimeSerial Function from VB6
LVL 50

Expert Comment

by:Ryan Chong
ID: 6412847

Dim myDate As Date
    myDate = TimeSerial(Hour(Time), Minute(Time) + 10, Second(Time))
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 67
Spell Check in VB6 13 114
Added a column screws up code 5 58
Problem to With line 4 57
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…
Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

831 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