Regarding Date Time Picker control in dot net

Hi, I am designing a windows application which needs dates subtraction from date to end date and report should be generated. How to subtract two dates(format should be dd:mm:yy) by comparing the dates from database table?

Can any one help me please??

hello I am also having the same problem but in visual c++ and same .net framework. Can anybody help???

if you are using international Date it has operator - in itself so you just need to write :
and it gives you the answer in ‘TimeSpan’ value that you can call the tostring() method:

DateTime DT1=DateTime.Now, DT2=DateTime.Now;
TimeSpan d = DT1 - DT2;

or you can just use the days differences by:


Good Luck


This is not a place to ask these sort of questions. Please ask these questions at .

1 Like