Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

IF Childrens LastEdited Date is over 10 days


Go to End


9 Posts   2419 Views

Avatar
Willr

Forum Moderator, 5523 Posts

23 September 2010 at 10:14pm

Perhaps I'm missing something but

LastEdit=1284830332
-10days=1284032978

Its returning true as LastEdit is > -10 days which is what the equality asks for so it returns true. Rather than using die() you should use Debug::show() so you can output all of them and see what their LastEdited dates are. You might also what to do Debug::show($this->dbObject('LastEdited')->Ago()) so you can see (without the numbers just how long ago it is.

Go to Top