A
andyoye
I have two date fields(startDate, endDate) in a form and I want to
calculate number of days between startDate & endDate.
Thanks
calculate number of days between startDate & endDate.
Thanks
andyoye said:I have two date fields(startDate, endDate) in a form and I want to
calculate number of days between startDate & endDate.
startDate field value is 10-01-09
endDate field value is 10-05-09
How can I get 4 .....(endDate-startDate)
Jeff,
Because this is in my answering thread.
I am curious, what is beside that I use C# 2008 code and Alberto C# 2003
code in your idea the difference between those two answers. Don't
understand me wrong, nothing wrong with Alberto its code, however you give
the impression there is something wrong with mine?
I already said: You ALL Rocks, thanks.
How about getting minutes difference? I mod the days code
TimeSpan timeDifference = endTime.Subtract(startTime);
int hours = timeDifference.Hours;
string hoursString = hours.ToString();
Now I do get hours but not minutes.
how about time difference to the minutes? below date and time values are
entered by users in text fields.
So startDate = 10-01-2008 startEnd= 2:05 PM
endDate = 10-03-2008 endTime = 1:00 PM
result should be 1days 22 hrs 55mins