How to check if a DateTime range is within another 3 month DateTime range

Posted by Jamie on Stack Overflow See other posts from Stack Overflow or by Jamie
Published on 2010-04-22T06:57:59Z Indexed on 2010/04/22 8:03 UTC
Read the original article Hit count: 347

Filed under:
|

Hi I have a Start Date and End Date per record in a db.

I need to check to see where the time period falls in a 2 year period broken into two lots of quarters then display what quarters each record falls into.

Quarter 1 includes June 09, Jul 09, Aug 09
Quarter 2 includes Sept 09, Oct 09, Nov 09
Quarter 3 includes Dec 09, Jan 10, Feb 10
Quarter 4 includes Mar 10, Apr 10, May 10
Quaretr 5 includes Jun 10, Jul 10...

e.g. 01/10/09 - 01/06/10 would fall into quarters 2, 3, 4 & 5

I am very new to .NET so any examples would be much appreciated.

© Stack Overflow or respective owner

Related posts about asp.net-3.5

Related posts about c#