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.

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   2403 Views


Forum Moderator, 5523 Posts

23 September 2010 at 10:14pm

Perhaps I'm missing something but


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