|
Post by milfredo on Nov 13, 2020 17:57:18 GMT -5
I have spent an hour trying to use the mid$ function on the following date.
"20010125"
I get just about every combination of numbers except what I need. I need to pull out the month. Which would be 01 Can somebody show me the correct number combo to use with mid$ to pull that out?
Thanks Milfredo
|
|
|
Post by xcoder on Nov 13, 2020 18:57:40 GMT -5
date$ = "20010125" month$ = mid$(date$,5,2) print month$;" as string" print val(month$);" as number value"
|
|
|
Post by Chris Iverson on Nov 13, 2020 18:58:32 GMT -5
The month starts at the fifth character(1-indexed) in that string. 5. The month takes up two characters in that string, so you need to retrieve two characters. 2.
print mid$("20010125", 5, 2)
|
|
|
Post by milfredo on Nov 13, 2020 19:26:05 GMT -5
Thank you so much.
|
|