Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

adding 10 minutes to the system time

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
0
newbie0815
Asked:
newbie0815
1 Solution
 
amebaCommented:
Hi, newbie0815

    Dim newdate As Date
    newdate = DateAdd("n", 10, Now)
    MsgBox newdate
0
 
Ryan ChongCommented:
Hi newbie0815,

Use the TimeSerial Function from VB6
0
 
Ryan ChongCommented:
Example:

Dim myDate As Date
    myDate = TimeSerial(Hour(Time), Minute(Time) + 10, Second(Time))
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
tureCommented:
newbie0815,

Here's yet another approach:

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

Ture Magnusson
Karlstad, Sweden
0
 
andyclapCommented:
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
0
 
newbie0815Author Commented:
thx to all of u!
0
 
amebaCommented:
FYI,
  B grade <> "Thanks"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now