Hi guys,

I'm sure that this would be an easy thing to do, but i'm away from c# for quite a long time. I need to compare two dates (only dd-MM-yyyy format) and show the result, but this result must be really accurate, meaning that it must make the calculation based on the number of days that each month has. Has anyone got an idea for it? I'm doing it in a WPF (C#) application.

Cheers

TimeSpan ts = Date1 - Date2;

That's all you need.

Be a part of the DaniWeb community

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