Syntax error Use of String.compare for a varchar field in SAP

Use of String.compare for a varchar field in SAP



Try to use SqlFunctions.DateDiff method overload which requires 3 inputs as follows −

var res = from a in db.Set<table1>()
where SqlFunctions.DateDiff("dd", a.Date, "20161922") >= 0
&& SqlFunctions.DateDiff("dd", a.Date, "20161122") < 0
select a
Updated on: 2020-02-13T12:36:25+05:30

110 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements