vgames master,
If the hour is equal or greater than 12 then you know it is afternoon;pm. Use a simple if else statement to include either an am or pm sign, next to the time. Also, if the hour is equal to or greater than 13, then subtract 12 from the hour. Combining these two methods will get you a standard looking time.
Runnable Program:
sync on
sync rate 60
REM << create array to hold values
dim time(3)
do
REM << record current time into a string
time$ = get time$()
text 5,5,"The get time$() command is returning the value of " + time$
REM <<<<<<<<<<<<<<<<<< string dessemblement >>>>>>>>>>>>>>>>>>>
REM << seperate string into three values(hour,mins,secs)leaving out colons
count = 5
for t = 1 to 3
REM << get both digits
time(t) = val(left$(time$,2))
REM << delete used digits and next colon
if t < 3 then time$ = right$(time$,count)
dec count,3
next t
REM <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
REM << print new values values as strings to the screen
text 5,20,"That is an army time of " + str$(time(1)) + " hours, " + str$(time(2)) + " minutes, and " + str$(time(3)) + " seconds."
REM << create standard time
if time(1) => 12
symbol$ = "pm"
if time(1) => 13 then time(1) = time(1) - 12
else
symbol$ = "am"
endif
text 5,35,"That is a standard time of " + str$(time(1)) + ":" + str$(time(2)) + ":" + str$(time(3)) + symbol$
sync
cls
loop

+NanoBrain+