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

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

Recommended Posts

  • Newbies
Posted

I'm trying to do a search on a date range, but it needs to be flexible. I have a list of end dates, and each week I would like to be able to run a script that returns projects that are due to end in the next week.

I wouldn't have thought it would be too dificult, but I just CANNOT make it happen, with a find or script or anything!

Help!

Thanks

Sam

Posted

Dates can be difficult to do finds and sorts on if they are not formatted properly. I deal with this by formatting dates yymmdd in a calculation field and then do all finds and sorts on this field. If your dates are formatted mm/dd/yy, your calc would be:

right(datefield,2)&

left(datefield,2)&

middle(datefield,4,2)

07/05/01 becomes 010705.

If months are expressed in text, June instead of 06 or 6, you'll have to convert the month to a number. The best way to do this is with a case statement.

To search the range of dates bewteen June 1 and July 5 search for:

010601...010705.

Note that dates prior to the 01/01/00 will sort/find after dates in the new millenium.

Good luck.

[ July 05, 2001: Message edited by: esteshk ]

  • Newbies
Posted

Brilliant, thankyou!

One question - can I search for a weeks time, but leave it flexible? in other words, I want to look for today + 7. Is this possible?

Thanks

Sam

Posted

Sometimes we just don't answer the question you asked! wink.gif" border="0.

To setup the find in a script:

Go to Layout[All fields] <--- field must be visible on current layout

Enter Find Mode[]

Insert Calculated Result[YourDateField,Status(CurrentDate)]

Insert Text["..."]

Insert Calculated Result[YourDateField,Status(CurrentDate) + 7]

Perform Find[]

-bd

Posted

And sometimes we try to give folks some insight into different ways of doing things. Status(CurrentDate) works well if you are starting from today! I thought it might be beneficial to Sam to have a general method for searching dates regardless of the start and end dates.

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