To have your automated Query run on the last day of the month, enter 31 in the day field. The program will know to adjust to the last day of each month.