Jump to:

23453 Posts in 18902 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » IF Childrens LastEdited Date is over 10 days

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

Page: 1 2
Go to End
Author Topic: 1537 Views
  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: IF Childrens LastEdited Date is over 10 days Link to this post

    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.

    1537 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.