I want to get it before September when I have monthly data, Since January, February, and March are the data for the next year, you may not want to include them. At that time, make a note of an example of how to remove it easily.
Convert each month to be compared as follows, It can be solved by judging using the converted value.
(Monthly+ 8) % 12
For example, when retrieving data before September By setting the monthly conversion value of the acquisition source data <= the reference monthly conversion value, Only April, June, July, August and September will be available. This is because the converted value will be as follows. Since the converted value for September is "5", you can get April to September, which is less than that value.
Monthly | Converted value |
---|---|
1 | 9 |
2 | 10 |
3 | 11 |
4 | 0 |
5 | 1 |
6 | 2 |
7 | 3 |
8 | 4 |
9 | 5 |
10 | 6 |
11 | 7 |
12 | 8 |
Recommended Posts