Dumb C# LINQ question regarding comparing past dates
I have to write a LINQ statement that finds the number of times an item appears in a database over the past 90 days.  That's easy but they are wanting to see the data in terms of 1-30 days, 31-60 days, and 61-90 days.

What I'm currently doing is creating a model that has the four sets of data, getting a list of  all the unique SKU's, and then finding how many times they appear in the data base.

My problem is the date ranges.  I'm create new DateTime objects and adding NEGATIVE days to them and I'm trying to use that to compare ranges.  I can't figure out how to say something like this:

Edited date is between (-30 days) and (-60 days).

I can't use a SP for this.  There has to be an easier way.  Maybe using a time span and seeing if it falls in that span?  I'm not sure.  I rarely work with dates.


Thanks...
Dumb C# LINQ question regarding comparing past dates
===

I have to write a LINQ statement that finds the number of times an item appears in a database over the past 90 days.  That's easy but they are wanting to see the data in terms of 1-30 days, 31-60 days, and 61-90 days.

What I'm currently doing is creating a model that has the four sets of data, getting a list of  all the unique SKU's, and then finding how many times they appear in the data base.

My problem is the date ranges.  I'm create new DateTime objects and adding NEGATIVE days to them and I'm trying to use that to compare ranges.  I can't figure out how to say something like this:

Edited date is between (-30 days) and (-60 days).

I can't use a SP for this.  There has to be an easier way.  Maybe using a time span and seeing if it falls in that span?  I'm not sure.  I rarely work with dates.


Thanks...