Need some help using date functions to perform quarter calculations. The input is in quarter type format: "Quarter #, YYYY". Based on the input quarter, I need to calculate the previous quarter information.


Based on the input quarter, calculate the previous quarter:
Input: "Quarter 1, 2001"
Output: "Quarter 4, 2001"

or Input: "Quarter 3, 2001"
out: "Quarter 2, 2001"

note: fiscal year starts in November. Therefore, Quarter 1 includes months of Nov, Dec, Jan (in different calendar yrs).

Thanks for your help!