I want to increase the mins/hours/seconds in a text box which holds the time. How is this done?
Thanks
Printable View
I want to increase the mins/hours/seconds in a text box which holds the time. How is this done?
Thanks
Use a Timer...
VB Code:
Private Sub Timer1_Timer() Text1.Text = Format$(Now,"hh:mm:ss") End Sub
:)
No, I want to change it. It is an input. I want to have a button to make the hours/mins increase or decrease. Thanks though :)
Why a textbox and not a label???
Woka
Well ok, a label then. Whatever...can it be done?
yep, use the DateAdd function (see VB help for the various parameters you can use)
Yea, use MS datepicker control...windows common control 2 :D
Just set the format to display time and you're away :D
Woka
use updown and text controls to reslove it?Quote:
Originally posted by TomGibbons
No, I want to change it. It is an input. I want to have a button to make the hours/mins increase or decrease. Thanks though :)
Here you go...
Woka
This can be used for time?Quote:
Originally posted by si_the_geek
yep, use the DateAdd function (see VB help for the various parameters you can use)
yep - you can use years, days, hours, seconds, etc etc...
umm can you please give me an example how?Quote:
Originally posted by si_the_geek
yep - you can use years, days, hours, seconds, etc etc...
This will add 32 seconds to "my_date":
my_date = dateadd("s",32,my_date)
see VB help for the list of parameters you can use ;)
Thanks, I'll be home in about an hour so I'll try it then.Quote:
Originally posted by si_the_geek
This will add 32 seconds to "my_date":
my_date = dateadd("s",32,my_date)
see VB help for the list of parameters you can use ;)
I am confused...:confused:
Why go through all that trouble when there is a VB control that has already been invented that will do exactally what you want...?
Woka
Oops, I didnt notice your post. Cheers woka, thats perfect :)Quote:
Originally posted by Wokawidget
I am confused...:confused:
Why go through all that trouble when there is a VB control that has already been invented that will do exactally what you want...?
Woka
D'oh! :D
Woka