Determine equality of Datetime values with minute precision within LINQ
问题 I need to compare two datetime values to determine equality(exactly the same),using minute precision.Would this be the best way to do it? My dates could have seconds and milliseconds, but i want to consider only down till minutes. where (Math.Abs(datetime1.Subtract(datetime2).TotalMinutes) == 0) 回答1: Checking whether Math.Abs(diff.TotalMinutes) == 0 won't do it, no - that's checking whether they're exactly the same. Are you trying to check whether they have the same minute, or whether they're