Click to See Complete Forum and Search --> : Call hour and Minute from system clock in VB 6
Tony2005
12-05-2003, 08:00 PM
basically i need to know what function can call the hour and minute from system clock in VB 6
i want to call them seperatley as i'll be stroing them in individual variables
ScaryBinary
12-05-2003, 08:54 PM
The Now() function returns the current date and time. Use the Hour() and Minute() functions to grab the hour and minute from that.
Hour(Now())
Minute(Now())
Tony2005
12-06-2003, 08:06 AM
i keep getting a type mis match when i try to stre it in a variable or even a lable
ScaryBinary
12-06-2003, 09:55 AM
Try to cast it:
Dim strHour As String
strHour = CStr(Hour(Now()))
Though VB is pretty good (or bad, depending on how you look at it) at automatically casting types for you.
SysOpt.com
Copyright Internet.com Inc. All Rights Reserved.