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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

get data sorted and restricted by date


Go to End


767 Views

Avatar
Wocker

Community Member, 6 Posts

9 November 2010 at 10:37am

I want to retrieve data and restrict the number of results based on the stored date.
The dates are all in the past. For example 11-11-1980, 25-11-1974, 14-12-1999, 30-4-2000

Now I want to select all content that has date with a day and month that is within 14 days of today. So in essence I want to ignore the stored year. But still it has work when we get to the end of the year, it has to continue to check in January.

I hope my question is clear, and someone can help me with this. I also tried to post this as http://www.silverstripe.org/dataobjectmanager-module-forum/show/14728 (so sorry for the double post but maybe rephrasing this question helps)