My simple clock.
An error corrected:
Minutes=Val(Mid$(Time$, 4,2)) if Hour is >=10, but Minutes=Val(Mid$(Time$,3,2) if Hour is<10
Clock
Clock
When I ran your program, I noticed that the seconds hand did not move.
The existing code does not check for 12 hour mode and tries to get seconds by getting the value of the AM/PM indicator. The code below corrects this.
---------------------------------------------------------------------------------
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
end if
---------------------------------------------------------------------------------
The existing code does not check for 12 hour mode and tries to get seconds by getting the value of the AM/PM indicator. The code below corrects this.
---------------------------------------------------------------------------------
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
end if
---------------------------------------------------------------------------------
Clock
[quote author=11070B021A105B51555357630 link=1327177907/1#1 date=1327420977]When I ran your program, I noticed that the seconds hand did not move.
The existing code does not check for 12 hour mode and tries to get seconds by getting the value of the AM/PM indicator. The code below corrects this.
---------------------------------------------------------------------------------
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
end if
---------------------------------------------------------------------------------
[/quote]
Yeah i also worked it...this code is all right
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
thanks for also solved me problem
The existing code does not check for 12 hour mode and tries to get seconds by getting the value of the AM/PM indicator. The code below corrects this.
---------------------------------------------------------------------------------
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
end if
---------------------------------------------------------------------------------
[/quote]
Yeah i also worked it...this code is all right
if ucase$(right$(time,2))="AM" or ucase$(right$(time,2))="PM" then
Segundos=val(right$(time,5))
else
segundos = val(right$(TIME,2))
thanks for also solved me problem