Yeah you can use VAL() to change a string to an integer but it's easier to use IanMs Matrix 1 Utilities Plugin to split the string rather than using a FOR/NEXT loop with MID$().
` Get the current time
a$=get time$()
` Split the string
split string a$,":"
` Grab the hours
h=val(split word$(1))
` Grab the minutes
m=val(split word$(2))
` Grab the seconds
s=val(split word$(3))
` Show the time
text 0,0,"Time = "+str$(h)+":"+str$(m)+":"+str$(s)
wait key
If you don't have it already IanMs Matrix 1 Utilities Plugin is free and it has many commands that are vital to ease of use. Commands like MID$() mentioned above in Darkbasics native command only takes out 1 character at a time from a string. IanMs version brings back the normal Basic version of MID$() that allows multiple characters to be extracted. Plus it has many more commands like SPLIT STRING to make life so much easier.
http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18