'where' date is greater than yesterday

2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 4, 2008   (RSS)

Re: [tsuluwerks] 'where' date is greater than yesterday

By Dave - September 4, 2008

Hi T, welcome to the CMS Builder forum! :)

It's possible with some (slightly complicated) MySQL code. Try using this line in your viewer code for the where:

'where' => " nameOfYourDateField >= (NOW() - INTERVAL 1 DAY) ",

That will show records with a date in the last 24 hours.

Hope that helps! Let me know how it works for you.
Dave Edis - Senior Developer
interactivetools.com