Compare dates in DataView.RowFilter?

前端 未结 3 2015
广开言路
广开言路 2020-12-16 16:03

I am scratching my head over something rather stupid yet apparently difficult.

DataView dvFormula = dsFormula.Tables[0].DefaultView;
dvFormula.RowFilter = \"         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 16:40

    You need to wrap your dates with #, not apostrophes.

    dvFormula.RowFilter = "#" + startDate.ToString("MM/dd/yyyy") + "# < EndDate OR EndDate = #1/1/1900#"; 
    

提交回复
热议问题