Jump to content

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

Recommended Posts

Posted

Hi everyone. How would I enter a date range?

For example: I am trying to enter years like 1995-2005 or 1998-2001. So lets say I perform a find for a 1999 and the date range entered in the record is 1998-2001, I want it to pull up that result.

I think if you manually entered it as 1998, 1999, 2000, 2001 and you did a find, it would pull up....but for stuff like 1975 - 2005 that would be out of control.

Any suggestions are appreciated.

Thanks!

Posted

I highly recommend you use two separate fields for starting and ending year or date, so that you can use them as actual number fields or date fields. They way you describe it, you're using text fields -- that will make it easy enough to parse out any data you've already entered, using LeftWords() or RightWords() calculations.

Posted

Well, I dont have this set up yet, so I dont have to worry about fixing an old problem. These fields will be made from scratch.

If I set up two different fields, and lets say I input 1998 in one field and 2001 in the second field, how would I perform a find (lets say to find a 1999)?

Posted

If you do put 1998-2001 into a text field and want to find 1999 in it, then you'll have to write a script which will compare a given year (1999, input with a Custom Dialog and stored in a global) with >= Left (years_field ; 4 ) AND <= Right ( years_field ; 4). In the loop, you would Omit Record and when done with going through all records, Show Omitted Only.

Posted

To find 1999, you'd put >=1999 in start and <=1999 in end.

Only records matching both criteria will be found.

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