WHERE stmt with Date
2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 28, 2008 (RSS)
By InHouse - November 28, 2008 - edited: November 28, 2008
Odd situation. A new site has an events-by-date page. The data has a start-date and an end-date field (aside from the auto-publish special fields).
When trying to query the data for:
The events that would be currently happening don't show up.
If I set up up as:
It works perfectly. This creates an 8hr widow, but I would have thought the first option would work.
I'm obviously misunderstanding something here. Can anyone clarify this for me please?
Thanks!
When trying to query the data for:
'where' => "end >=NOW()",
The events that would be currently happening don't show up.
If I set up up as:
'where' => "end >=(NOW() - INTERVAL 8 HOUR)",
It works perfectly. This creates an 8hr widow, but I would have thought the first option would work.
I'm obviously misunderstanding something here. Can anyone clarify this for me please?
Thanks!
Re: [InHouse] WHERE stmt with Date
By Dave - November 28, 2008
Hi InHouse,
Your MySQL server time may be off by a few hours (or in a different timezone. Check that the timezone offset is set under Admin > Regional Settings.
Let me know what happens.
Your MySQL server time may be off by a few hours (or in a different timezone. Check that the timezone offset is set under Admin > Regional Settings.
Let me know what happens.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com