Results 1 to 8 of 8

Thread: Birthday Query

  1. #1
    Join Date
    Jul 2014
    Posts
    12

    Question Unanswered: Birthday Query

    Hi,

    I need to have a query which returns all birthdays of "Today", based in the Date Field. I am new to BDB and cannot figure out how to achive this.

    Thanks for helping


    Eddy

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Eddy
    If I understand your situation, you would use the system variable "date" equal to your birthday field.
    Regards
    David

  3. #3
    Join Date
    Jul 2014
    Posts
    12
    I tried this way but didn't work, probably because the year of birth are different from today's date.

    Thanks for helping

  4. #4
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi again
    Sorry should have scene that. What I would do is use the date functions (date part). Would need to format current date and persons birthday wth two rule statements of day and month. Remember to use formula and not text formula in each of 2 rules in "and" query Could make sample file if in trouble.
    Regards
    David
    Last edited by tamcind; 07-16-14 at 19:15.

  5. #5
    Join Date
    Jul 2014
    Posts
    12
    When you have the time, please provide a sample file.
    I am new to BDB and totally lost trying to understand how it works.

    Thanks for helping.

  6. #6
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Eddy
    Please find sample file attached.
    Note blue colour fields are just for reference.
    Key function used is "datepart" which returns the day , month or year as needed.
    Query finds all records with todays day "and" todays month.
    Avoid text formula as we are comparing numbers and text can give odd results under certain conditions.
    David
    Attached Files Attached Files

  7. #7
    Join Date
    Jul 2014
    Posts
    12

    star gate

    Hi David,

    Your example file worked perfectly!...
    and helped me better understand how things are done in BDB.

    Thanks for caring and taking the time to make an example file, just to help.



    Eddy

  8. #8
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    Quote Originally Posted by tamcind View Post
    ...Avoid text formula as we are comparing numbers and text can give odd results under certain conditions....
    David,
    That is a very interesting statement you made concerning 'formulas' versus 'text formulas'. In many cases, it does seem to work; however, there are those instances where it does not... just as you said. Mistakenly, earlier, I used 'text formulas' instead of the proper 'formula' from variable comparisons. I did this because the answer appeared to be right (at least during my testing) AND (mostly) because the Ruleset Editor indicated that 'text formulas' were executed faster than 'formulas'. I have gone back and corrected these bad assumptions. Speed of execution is meaningless if the results are incorrect!
    Daryl G

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •