nowdate in article

Status
Not open for further replies.

verzevoul

Member
Hi! Happy holidays!
When you get back I need your lights with that.
I have an article and I m trying to use a date element with todays date, or with the date from today + 7 days.

{fabrik view=list id=1 showfilters=0 1_epikoinonias___politis=[$my->id] 1_epikoinonias___field_imerominia_rantevou=curdate()}

thats what I entered in my article, I tried curdate() and nowdate but it diesn t work form me. What is the syntax please for a today and 7 days after?
 
Code:
{fabrik view=list id=1 showfilters=0 1_epikoinonias___politis=[$my->id] listname___field_imerominia_rantevou[value][]=now listname___field_imerominia_rantevou[value][]=%2B7+DAYS element_test___date_time[condition]=BETWEEN}

As the plugin filter code is treated as if it was sent via the querystring it needs to be encoded, to '%2B7+DAYS ', when we parse that the "%B7" is decoded to a '+' and the following '+' is decoded to a space, giving '+7 Days' as the top ranged filter value. So your filter is saying "give me values BETWEEN now and + 7 Days

The "+7 Days" format comes from PHP's strtotime method - so any time defined here http://php.net/strtotime should be usable by the filter.
 
Thanks Rob for your answer. I tried
{fabrik view=list id=1 showfilters=0 1_epikoinonias___politis=[$my->id] 1_epikoinonias___field_imerominia_rantevou[value][]=now 1_epikoinonias___field_imerominia_rantevou[value][]=%2B17+DAYS field_imerominia_rantevou[condition]=BETWEEN}

and


{fabrik view=list id=1 showfilters=0 1_epikoinonias___politis=[$my->id] 1_epikoinonias___field_imerominia_rantevou[value][]=now 1_epikoinonias___field_imerominia_rantevou[value][]=%2B17+DAYS element_test___date_time[condition]=BETWEEN}

but I can t make it.

Do I have to change element_test___date_time to something else? Or should I leave it.

Also I checked if there is a row with date 6/01/2013 and there is. It should return the row.
 
ah woops yes you need to change that to the full element name, I'd failed to change that when I posted my previous reply so.....

Code:
{fabrik view=list id=1 showfilters=0 1_epikoinonias___politis=[$my->id] 1_epikoinonias___field_imerominia_rantevou[value][]=now 1_epikoinonias___field_imerominia_rantevou[value][]=%2B7+DAYS 1_epikoinonias___field_imerominia_rantevou[condition]=BETWEEN}
should work.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top