Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C#
c# calculate difference between two dates in days
Dan Rayson
Programming language:
C#
2021-06-01 07:00:29
0
Q:
c# calculate difference between two dates in days
Widi Widiyanto
Code:
C#
2021-04-01 11:24:52
(EndDate - StartDate).TotalDays //double (EndDate.Date - StartDate.Date).Days //int
4
Tags
between
date
two
day
Related
Get all dates of every monday between two dates in c#
c# how to compare 2 dates without time
How to get number of months between 2 dates c#
New to Communities?
Join the community