Jump to content

Finding Records between 2 dates


CKonash

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

Recommended Posts

Hello, 

I could use some help with a find function.  I have a table with fields  for DateStart and DateEnd for each record.  I have been unsuccessful in getting a Find to work when I have a single global date field and then a Find script.  I when I enter a date into the global field and then use the find methods below I am not returning the records that fall in between those dates, it looks like I am returning the records that start and end on the date of the global date field?   

This seems like a simple idea but I can't figure out how to find records between dates based on a single field find script.

 

 

  5a0f6dc520187_ScreenShot2017-11-17at6_12_39PM.png.6cd855e931c6ba66e25eb6614c8d4b49.png5a0f6dc48c228_ScreenShot2017-11-17at6_12_56PM.png.29ed16e897387d9e819ef56c53adb850.png

 

 

Link to comment
Share on other sites

Your operators are reversed.

Prep_Returns::DateStart ≤ $DateSort
Prep_Returns::DateEnd ≥ $DateSort

BTW, the Show All Records step is redundant. Perform Find automatically searches the entire table. And you don't need to put the Prep_Returns::g_DateSort field into a variable. You can use it directly in the Find criteria.

Edited by doughemi
Link to comment
Share on other sites

Hi Doughemi, 

Thank you so much.  I can't believe I just had the symbols backwards.  I could have sworn that I tried that.   Also thank you very much on letting me know about the extra script steps that I didn't need.  I learned filemaker by watching other and just doing so things like that I never learned before.  

Thanks again!

Chris

 

Link to comment
Share on other sites

This topic is 2348 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.