How to apply a filter to a browse

I have a Browse procedure that I want to filter based on an empty Date field.
There is Boolean variable set to 0 at window opening and a Button to apply or remove the filter.
The following code is placed in ThisWindow.TakeAccepted procedure.
Apparently "empty" Date fields default to 1/1/0001. I have tried several filters with and without the Year() function, including 0, < various numbers, and Not.
No compile errors occur. Usually clicking the filter button has no effect, occasionally I get a run-time error about inability to apply an invalid filter.
Any advice as to what to do differently will be much appreciated. TIA

     ! Start of "Control Event Handling, after generated code"
      ! [Priority 5000]
      If Filtered = 0
      	BRW1.SetFilter('Year(Lns:DateReturned) = 1')
      	BRW1.ApplyFilter
      	Filtered = 1
      ElsIf Filtered = 1
      	BRW1.SetFilter('')
      	BRW1.ApplyFilter
      	Filtered = 0
      End 
      ThisWindow.Update()
      
      ! End of "Control Event Handling, after generated code"
      ! End of "Control Event Handling"

Perhaps I should mention that the Browse has only one key.

What driver? What database?

First I notice is Year=1, can't happen, not after Christ's crusification

Next: setfilter has a second name parameter. Without using that, resetsort will apply standard filters.

Setfilter applies to current sort order, you will need to add a new sort order to replace existing criterias. I might be remembering wrong, but there might be some wildcard filtername you can use to replace, consult the docs on setfilter.

This is a PS File; not SQL. All files in Application are TPS.
And just in case: Clarion 12; ABC.