Limiting results to a date range

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 9, 2009   (RSS)

By Tayvis - March 9, 2009

I'd like to limit the records displayed based on a date field: specifically, I want dates that are anywhere between today and 60 days from now. Any ideas?

Re: [Tayvis] Limiting results to a date range

By Dave - March 9, 2009

Tayvis, welcome to the CMS Builder forum old friend... :)

It's possible with a little custom MySql. Try this:
'where' => "createdDate >= NOW() AND createdDate <= (NOW() + INTERVAL 60 DAY) ",

Change 'createdDate' to match your date fieldname.

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com