Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Filtering List by Date

  • abo
  • abo
  • OFFLINE
  • Posts: 30
  • Thanks: 4
  • Karma: 1
8 years 4 months ago - 8 years 4 months ago #283255 by abo
[SOLVED] Filtering List by Date was created by abo
Apologies - this is a really stupid question, and I will probably feel even more stupid, once the answer comes... B) However, neither in the documentation nor in the forum I found the answer to this simple question.

To provide a list of "expired" members I would like to filter by date in the following format

cb_expiration_date smaller than today's date

For today's date I tried:
  • date
  • date()
  • 'date'
  • 'date()'
  • var.date

and a few more... Can't think of any others...

Thanks for your help.
Last edit: 8 years 4 months ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 4 months ago - 8 years 4 months ago #283272 by krileon
Replied by krileon on topic Filtering List by Date
You have to use an advanced filter for that. Basic filters won't work in this case. Example advanced filter as follows.

ue.`cb_expiration_date` (less than or equal to operator.. excluded due to kunena bug removing it) NOW()

dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html

The "ue" table alias is for _comprofiler table and "u" alias is for _users table.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 8 years 4 months ago by krileon.
The following user(s) said Thank You: abo

Please Log in or Create an account to join the conversation.

  • abo
  • abo
  • OFFLINE
  • Posts: 30
  • Thanks: 4
  • Karma: 1
8 years 4 months ago #283281 by abo
Replied by abo on topic Filtering List by Date
Okay, I don't feel quite as stupid after all ... B)
  1. It wasn't that obvious
  2. I was able to implement the solution with your instructions

Thanks. ;-)
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum