Expression to filter Date

Stimulsoft Dashboards.WIN discussion
Post Reply
Bisoux
Posts: 16
Joined: Wed Jul 08, 2020 12:30 pm

Expression to filter Date

Post by Bisoux »

Hi,

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
This is not working. Can you please tell me the way to do this?

Thank you
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Expression to filter Date

Post by Lech Kulikowski »

Hello,

Please check that the startDate column is DateTime.
Also, please check Reports.startDate.Year

Thank you.
Post Reply