Рет қаралды 7
Getting the month requires we do a little extra processing.
Couple of things here. The Sakhir practice session has a different key word from the regular racing sessions. No problem, we get all the racing session first by using their specific key word. To get Sakhir we’ll just use “month-wrapper” as the key word and extract it in the “else” section of our month “IF” statement. It’ll make more sense when you see it.
The extra piece of processing is the month name or names itself. You’ll note that when a race bridges a month, we end up with both month names in the data separated by a hyphen. When it’s just a single month you have 3 characters of data.
Well, you solve this little problem by saving 7 characters of data in all cases. You save that in a work area. Then you examine the 7-character variable. If it contains a hyphen, you want all 7 characters. If there is no hyphen you just want the first 3 characters. Simple as that.