Skip to Content Skip to Menu

Birthdays of today

1 year 1 month ago #334953 by clubcarriere
Birthdays of today was created by clubcarriere
Hi,
I want to show a list of all users, with birthday is today.
How can I do this?
Greetings from Vienna
George

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334967 by krileon
Replied by krileon on topic Birthdays of today
You'd need to create a userlist then use an Advanced filter to filter the userlists down to those with a date field (their birthdate field) matching today. You'll need to write the SQL for that. Something like the below might work.
Code:
MONTH( `FIELD_NAME` ) = MONTH( CURDATE() ) AND DAY( `FIELD_NAME` ) = DAY( CURDATE() )

Replace FIELD_NAME with the name of your birthdate date field. It should match the month and day.


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.

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

1 year 1 month ago #334984 by clubcarriere
Replied by clubcarriere on topic Birthdays of today
Hi,
thanks for reply, but  - it doesnt work.
best wishes
George

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334987 by krileon
Replied by krileon on topic Birthdays of today
Try the following. Sorry we do not provide coding assistance here outside of simple examples. If still not working please contact a SQL expert to help you.
Code:
MONTH( `FIELD_NAME` ) = MONTH( NOW() ) AND DAY( `FIELD_NAME` ) = DAY( NOW() )

You must replace FIELD_NAME with the actual name of your field. So if the name of your field is cb_birthday then your query would be as follows.
Code:
MONTH( `cb_birthday ` ) = MONTH( NOW() ) AND DAY( `cb_birthday ` ) = DAY( NOW() )

This expects cb_birthday to be a Date fieldtype.


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum