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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2709 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