I want to auto calculate the fiscal year quarter based on the date a form was filled out. I want to do this in a hidden value. I am having trouble finding examples of if statements that classify a date range as Quart 1, if between 2 dates.
Does the below look correct? FY18, Quarter 4 is coded numerically at 1804 (YY0quarter), whereas FY19, Quarter 1 is 1901.
format-date(#form/PrsntDate, "%y"), - generates the last part of the year
cond(format-date(#form/PrsntDate, “%m”)< 4, “01”, format-date(#form/PrsntDate, “%m”)< 7, “02”, format-date(#form/PrsntDate, “%m”)< 10, “03”, “04”) - would generate Quarter for any date. This is done by extracting the month part.
concat(..., ...) combines the values returend by points 1 and 2