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, biapar, Willr, Ingo, swaiba, simon_w

IF Childrens LastEdited Date is over 10 days


Go to End
Reply


9 Posts   1700 Views

Avatar
Willr

Forum Moderator, 5513 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