I have a startDate field in a mysql database. This is a datetime datatype. I am trying to extract the year part using the year function on a filter on a databand. I want to then compare it to data entered by the user in the TYear variable and return the filtered records. For the year 2020 the user will enter 2020. The filter should give me all records prior to and including 2020. If I remove the filter I am getting all records, but if i put the below filter there are no records returned.
Code: Select all
Year(Reports.startDate) <= TYear
Thank you