Answers for "c# datetime diff in hours"

C#
2

fdifference between two date in hours c#

double dif = (greaterDate - smallerDate).TotalHours;
Posted by: Guest on January-13-2021
0

get diff btw datetimes two C#

int totalDays = Convert.ToInt32((DateTime.UtcNow.Date - myDateTime.Date).TotalDays);
Posted by: Guest on November-21-2021

C# Answers by Framework

Browse Popular Code Answers by Language