if ( a. AddDays( 7- a.DayOfWeek ).Date.Equals(b.AddDays(
7-b.DayOfWeek ).Date) )
{
// their int the same week
}
else if ( a. AddDays( 7-
a.DayOfWeek ).Date.Equals(b.AddDays( -b.DayOfWeek ).Date) ){
// a is in the last week of b
}
Hope this help.
"Hadi" <ha**@hadi.net> Đ´ČëĎűϢ
news:O0**************@TK2MSFTNGP10.phx.gbl...
Hello,
I have to DateTime structure, how do I calculate if date A is on the same
week with date B or last week of date B?
Thanks,
Hadi