True, Mid$() is somewhat limited but I can provide you with a small function where you can set the length of return:
function Midstr(s$,pos,ln)
rem --- an extended version of mid$() where you can set the length of return
t$ = left$(right$(s$,len(s$)-(pos-1)),ln)
endfunction t$
As for converting strings to integers you need to use the Val() command as the following example I hope will show:
date$ = get date$()
time$ = get time$()
days = val(Midstr(date$,1,2))
months = val(Midstr(date$,4,2))
years = val(Midstr(date$,7,2))
hours = val(Midstr(time$,1,2))
mins = val(Midstr(time$,4,2))
secs = val(Midstr(time$,7,2))
print date$
print time$
print
print "Integer values"
print "Days = ";days
print "Months = ";months
print "Years = ";years
print
print "Hours = ";hours
print "Minutes = ";mins
print "Seconds = ";secs
wait key : end
function Midstr(s$,pos,ln)
rem --- an extended version of mid$() where you can set the length of return
t$ = left$(right$(s$,len(s$)-(pos-1)),ln)
endfunction t$
I hope this is useful to you
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.