How to get two time difference in minute in C# or .net.

For getting time difference in minute you can use below function. Pass parameter datetime one and date time two and you will get total difference in minute.

        public static double TimeDifferenceInMinutes(DateTime dateone, DateTime datetwo)
        {
            var duration = dateone - datetwo;
            return duration.TotalMinutes;
        }

Page Keyword: Time difference in .net, Time difference in C#, Time difference in umbraco, DateTime difference in .net, DateTime difference in C#, DateTime difference in minute .net, DateTime difference in minute c#

Advertisements

One thought on “How to get two time difference in minute in C# or .net.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s