Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Filter Date to show Bday's this week & Sort


This topic is 4689 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted (edited)

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... :laugh2:

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 by comment
Posted

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.

This topic is 4689 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.