January 21, 201214 yr I have a portal showing all the students and their birthdays. I want to display only the children who have a birthday coming up this week. I tried filtering the portal with the following calculation; Students:Birthdate ≥ Get(CurrentDate) AND ≤ (Get(CurrentDate +7)) .... But no cigar. I have also tried sorting the dates by Students:Birthdate but it sort by year, then Month Name (which is not the mlnths in order) Mmm, got a few ideas about teh sorting but no clue about the filtering. Any help would be greatñy appreciated. Thanks so much
January 21, 201214 yr I have a portal showing all the students and their birthdays. Do you mean their dates of birth (including the year)?
January 21, 201214 yr Well, then: Students:Birthdate ≥ Get(CurrentDate) would be true only for students that were born today, wouldn't it? I think they might be too young to attend a school - though a cigar could definitely be appropriate for some... How about something like = Let ( [ today = Get (CurrentDate) ; bDay = Date ( Month ( Students:Birthdate ) ; Day ( Students:Birthdate ) ; Year ( today ) ) ] ; today ≤ bDay and bDay ≤ today + 7 ) Note that this is not perfect: it calculates when is the student's birthday in the current year. When you are in the last days of December, the students in the first days of January will not be listed. See a more detailed discussion here: http://fmforums.com/...ow-can-i-do-it/ Edited January 21, 201214 yr by comment
January 21, 201214 yr Author Geez you're clever. I just had to add a right bracket in there to end the date function, and all worked perfectly. Thank you so much, I learn so muchg when I follow your logic step by step. Thanks again.
Create an account or sign in to comment