Forums / Developer / Fetch objects published between two dates
Eirik Alfstad Johansen
Friday 02 November 2007 2:24:10 am
Hi,
I'm trying to (3.9.1) fetch a list of objects published between two specific dates. My attribute filter looks like this:
array( 'and', array( 'published', '>=', [start_timestamp]), array( 'published', '<=', [end_timestamp]))
However, this doesn't give me any nodes. When I try to replace the "and" with an "or", I get all the objects instead.
What am I doing wrong?
Thanks in advance !
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Julien Plesniak
Tuesday 06 November 2007 7:21:15 am
Hello,
try with this example:
{def $datej = currentdate()}
and
'attribute_filter', array(array(186,'<',$datej),array(187,'>',$datej))