I have been tasked to store a QVD but with a very specific file name, example: FIleName - JUL 2021.
The month name is determined by the day number of month. If the day number is less than 8 (i.e. the first 7 days of the month), the users want the filename to show the previous month name. Day 8 and beyond would be the current month. The year would show the year, however they want it in Fiscal Year. Our Fiscal Year starts July 1. So currently, we are in fiscal year 2021.
Examples of correct filenames:
If today's date is 7/8/2020, 'Filename - JUL 2021'
If today's date is 7/2/2020, 'Filename - JUN 2020'
If today's date is 10/15/2020, 'Filename - OCT 2021'
If today's date is 1/3/2020, 'Filename - DEC 2021'
If today's date is 1/8/2020, 'Filename - JAN 2021'
So two things to consider: Our fiscal year, and the day number of the month. A little confusing to wrap my head around.