quarter-from-datetime is for XPaths, so won’t work here.
Assuming you have a localised DateTime called $Date, you can get the current quarter when creating a variable using…
ceil(parseInteger(formatDateTime($Date, 'M')) div 3)
If your DateTime isn’t localised, use formatDateTimeUTC.
Hope this helps