Dear All,
I needed to get the previous quarter, which I found a solution for in this forum.
Solution was this dictionary:
dict = New Dictionary(Of String,String)From{{“Jan”,“Q1”},{“Feb”,“Q1”},{“Mar”,“Q1”},{“Apr”,“Q2”},{“May”,“Q2”},{“Jun”,“Q2”},{“Jul”,“Q3”},{“Aug”,“Q3”},{“Sep”,“Q3”},{“Oct”,“Q4”},{“Nov”,“Q4”},{“Dec”,“Q4”}}
Assign: str_quarter = dict(MonthName(today.month-1,true))
So far so good.
But if the found quarter is Q4 (meaning: today is January, so it should find December which is in Q4), it’s not working.
This is the error:
It works fine with all other examples, but not if the “current month” is January.
How can I tackle this?
Is there another possibility even without the New Dictionary?
Thanks for your support in advance!
Juli