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

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

Recommended Posts

Posted

I know this is probably simple, but I can't quite get it.... I have a script that copies two date fields to a global text field. I'm using a text field because I need to separate the two dates with "..." in order to do a "between these dates" find in date fields in 3 other files. The problem I'm running into is that if dates are entered as single digits (1/1/2003), the finds do not produce exact results. I tried to fix this by formatting the fields to represent as 2 digits (01/01/2003), and while they display correctly, when the script goes to copy the date field, it copies it as originally entered, not as formatted. I need to add the "0" before I paste the dates into the global text field, but I don't have a clue as to the formula.

Thanks

Todd

Posted

Will that still work when the date is enetered in only one field(1/1/2003)? If so, what are the script steps? I haven't used the case function before.

Thanks

Posted

Um, rereading your question makes me wonder why you're having trouble. Whether or not the '0' is in front of day or month in a date shouldn't have an effect on the find result. Something else is going on here. Also, 'formatting fields' only effects the way they display on a layout; it does nothing to the actual field itself, which is why you're not seeing the data itself change when you format it.

Posted

That's what I thought, too. But the results are the same time and time again. Any ideas what I might be missing? When I try a FIND between date ranges using single digits in the day and month fields, I don't always get the same results as when I use two digits in the day and month fields. In a simple find request using one date, it always comes up on that date regardless of the amount of digits. I'm only having a problem when I use something like 1/1/2003...7/23/2003. It will return records not within that date range.

Thanks

Posted

I should add that the date range is part of a second request in a modified Find. It's a situation where I have to find a group of names, and then initiate a second request on that group to find only the entries between certain dates.

Posted

I think I just figured out the problem - The second find request is superfluous and was mucking up the works. I just need to do 1 find request with the name and the date range entered (in each of the 3 files) and everything seems to work. I knew there was a simple answer. Thanks for your input.

Posted

Yes, I was just going to add that. The way multiple find requests works can be tricky. What you were in fact doing was finding BOTH records between the dates specified AND any records with the specified group of names. Glad you figured it out on your own. Good going. smile.gif

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