$ 0 0 To calculate the Quarter from a date in the datawindow you can use this: 1 + int ((month (duedate) - 1) / 3)