time / system time / timer questions

viper52b
09-01-2003, 07:41 AM
I actually have two questions, both related to time...

1) I figured out how to show the current system time, but i was wondering how i can compare it to a given time (eg for an alarmclock)

2) I wanted to create a clock, that starts at 00:00 and runs ten times as fast as a normal clock, and that i can adjust while its running (eg + 1h, -1h, etc...)

Many thx in advance!
(i would also really appreciate tutorials that are related to time, timers, etc)

Iceplug
09-01-2003, 08:23 AM
It's easy if you use Date variables (they hold times).
Dim D As Date
D = #9/9/2003 9:29 AM#
1)
To check, you can do this:
If D < Now Then (date is in the past)
ElseIf D > Now Then (date is in the future)

2) The DateAdd function will increment the seconds and minutes by whatever you want them to increase by. Add a timer, and you've got a clock! :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum