Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C#
c# how to compare 2 dates without time
Jasper
Programming language:
C#
2021-04-30 17:50:43
1
Q:
c# how to compare 2 dates without time
Ruban Savvy
Code:
C#
2021-03-22 02:54:00
if(dateTime1.Date == dateTime2.Date) // or if (dateTime1.Date.CompareTo(dateTime2.Date)) { }
0
Tags
time
date
how
compare
Related
how to compare datetime in c#
c# web form compare dates
c# calculate difference between two dates in days
c# compare type
how to calculate expiry date in c#
c# subtract 24 hours form datetime
How to get number of months between 2 dates c#
Get all dates of every monday between two dates in c#
how to check if time is between two timespans in c#
c# distinct comparer multiple properties
c# how does comparing datetime work
asp net c# compare date to current
c# compare months
New to Communities?
Join the community