Simple Question: Fetch Records based on Date Function

Simple Question: Fetch Records based on Date Function

Hello all!

Thanks in advance for your insight. I'm having trouble trying to fetch records based on date. Here's what I'm trying to accomplish:

Given Activity_Date(date field), month(int), and year(int).

  1. list = Booking[Activity_Date.getMonth() == month && Activity_Date.getYear() == year];

The error message says "Invalid Criteria." This is probably something simple I missed in documentation. What am I missing?