All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Filter Low search by Date / Custom fiel ?

Frank Oehrlein 15 Nov 2013 08:44 question, complete

Hello,

we are working with low_search and would like to add to our Code:

{exp:low_search:results query="{freebie_2}" limit="10" paginate="both" show_expired="yes"}

something like: "where event_date > date-30 days}

I didn#t find any working solution, maybe you can help me ?

greetings
Frank

Replies

  1. Low 15 Nov 2013 08:50

    What is the field type for the event_date field?

  2. Frank Oehrlein 15 Nov 2013 08:55

    It is a field in expression_channel_data . it is the date with that i try to filter Events from the last 30 days to the future.

    Sorry my English is not the best

  3. Low 15 Nov 2013 09:01

    Is it a native Date field? If so, you can use the Range filter.

  4. Frank Oehrlein 15 Nov 2013 09:10

    It is field_id_7 and the date is in seconds (1383260340) did you mean that ?

  5. Low 15 Nov 2013 09:15

    Don't look at the database. Look at your EE Control Panel. You added the field to a channel field group and gave it a name (event_date?). Use that with the Range filter:

    range-from:your_field_name="2013-10-15"

  6. Frank Oehrlein 15 Nov 2013 09:29

    Yes that goes in the right direction

    range-from:event_date="{current_time}-'2592000'"

    But he wont let mit go back 30 days ?!

  7. Frank Oehrlein 15 Nov 2013 09:31

    got it !

    Damn i am stupid.

    THANKS A LOT !!!!

  8. Frank Oehrlein 15 Nov 2013 09:39

    Nearly but not complete correct.

    Maybe you know how to go back 30 days ? That doesn't work ?!

    range-from:event_date="{current_time format="%U" -25920000}"

  9. Low 15 Nov 2013 09:40

    Try this: range-from:event_date="-30 days"

  10. Frank Oehrlein 15 Nov 2013 09:42

    PERFECT

    That's it, thanks