My date and time is different, i want time calculate in total minutes

example:-

A time is 10/19/2011 1:26:00 PM
B time is 11/11/2011 7:14:00 AM

please suggest.....

Recommended Answers

If you have 2 DateTime objects, you can subtract them to get a TimeSpan object. This TimeSpan object can be expressed in TotalMinutes.

MSDN documentation links:
DateTime.Subtraction operator
TimeSpan.TotalMinutes

Jump to Post

All 3 Replies

If you have 2 DateTime objects, you can subtract them to get a TimeSpan object. This TimeSpan object can be expressed in TotalMinutes.

MSDN documentation links:
DateTime.Subtraction operator
TimeSpan.TotalMinutes

thanks for your suggestion. its word

thanks for your suggestion. its working

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.