Do you have this all in one field or something? If so that is not the correct way, this statement above just has a function at the front. Also all of your syntax is incorrect.
You need to split this to 2 fields.
Field_1 is format-date(${inspection_date}, '%n') note set to integer type and appearance as hidden. Set bind::type to null if you do not want this field in the final schema.
Then Field_2 uses the value from Field_1
Easier to read this way and proper syntax
if(${Field_1} <= 3, 'Q1', if(${Field_1} >= 4 and ${Field_1} <= 6, 'Q2', if(${Field_1} >= 7 and ${Field_1} <= 9 'Q3', 'Q4')))
Would be a good idea to read up on how if statements work in general. if(condition, true, false)