Date comparison, js date comparison
SQL statement:
1 2 3 4 |
1) select * from TableName where StartTime> '2017-04-08' 2) select * from TableName where StartTime> = '2017-04-08' 3) select * from TableName where StartTime <'2017-04-08' 4) select * from TableName where StartTime <= '2017-04-08' |
Lambda expression syntax:
1 2 3 4 |
1). Where (a => a. StartTime. CompareTo ('2017-04-08 ')> 0) 2). Where (a => a. StartTime. CompareTo ('2017-04-08 ')> = 0) 3). Where (a => a. StartTime. CompareTo ('2017-04-08 ') <0) 4). Where (a => a. StartTime. CompareTo ('2017-04-08 ') <= 0) |
More standardized writing:
1 2 3 4 |
1). Where (a => String. Compare (a. StartTime, '2017-04-08 ', StringComparison. Ordinal)> 0) 2). Where (a => String. Compare (a. StartTime, '2017-04-08 ', StringComparison. Ordinal)> = 0) 3). Where (a => String. Compare (a. StartTime, '2017-04-08 ', StringComparison. Ordinal) <0) 4). Where (a => String. Compare (a. StartTime, '2017-04-08 ', StringComparison. Ordinal) <= 0) |