|
Forgot to say that this kind of data is many and different in length, for example:
10 minutes and 2 seconds
12 minutes 45 seconds
1 minute and 2 seconds
1 minute 23 seconds
7 seconds ---- no "minutes"
48 seconds
My initial thoughts were:
1. Use the len function to obtain the length.
Use SEARCH ("minute", str, 1) to determine whether the number of digits before "minute" is 1 or 2 digits, and then use mid () to take out
2.len is less than 4, the string has no "minute", use search ("second", str, 1) to determine the number of digits, and then use mid () to take out
It's complicated, I don't know if there is a better way! |
|