• 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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