Filtering dataset on date fields

Hello Experts,

I am trying to filter a dataset with a filter by using MyDataSet.Tables("MyTable").Select("DateCol = Date")

It works fine as it is written now, but when I want to filter for a specific year or month I can't get it to work as the month() and year() functions don't seem to work when used in a filter expression.

How can I make a filter so that I can show all date fields from a specified month or year?

Thanks in advance.
Who is Participating?
MrunalConnect With a Mentor Commented:
Better approach is:

Add one more column to datable (either from database query or before accessing for filtration.

then apply filtering on that column for matching month.
LabelsoftAuthor Commented:
This sounds like an solution that I might take if there is no other way around it, but I prefer to be able to apply a filter directly on the date field, but from my searches on google I come to think that might not be possible.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.