Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


adding 10 minutes to the system time

Posted on 2001-08-22
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Expert Comment

ID: 6412836
Hi, newbie0815

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

Expert Comment

by:Ryan Chong
ID: 6412838
Hi newbie0815,

Use the TimeSerial Function from VB6
LVL 53

Expert Comment

by:Ryan Chong
ID: 6412847

Dim myDate As Date
    myDate = TimeSerial(Hour(Time), Minute(Time) + 10, Second(Time))
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 22

Accepted Solution

ture earned 150 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

670 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