Jump to content

date range script


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

Recommended Posts

  • Newbies

I have three layouts. Layout "A" contains records with a start date and a finish date. Layout "B" is a find layout. Layout "C" is a summary layout. On my "B" layout, I have buttons that find records within a given range from the current date (ie. "within 30 days", "within 60 days", and "within 90 days".)

Let's say I click on the "within 30 days" button on the "B" layout. I want a script that performs the following: Go into the "A" layout, find all Start Dates of the records that are within 30 days of the current date, and show those records on the "C" layout. The date format of the "A" layout is mm/dd/yyyy.

Link to comment
Share on other sites

I think I can help.

Here is an example using a 30 day request:

Goto Layout "A"

Enter find mode

Paste Current Date (select date field you are searching)

Paste Literal (do NOT select entire contents, "...")

Paste Result (do NOT select entire contents, select date field, "Today + 30")

Perform find

Goto Layout "C"

You can use the same example for 60 and 90 day searches. You could also shorten the script by performing the appropriate find 1st and then simply "Perform find" and restore find requests. Of course you would still need to switch layouts.

Hope this helps!

JM

[This message has been edited by JM (edited November 17, 2000).]

Link to comment
Share on other sites

quote:

Originally posted by JM:

I think I can help.

Here is an example using a 30 day request:

Goto Layout "A"

Enter find mode

Paste Current Date (select date field you are searching)

Paste Literal (do NOT select entire contents, "...")

Paste Result (do NOT select entire contents, select date field, "Today + 30")

Perform find

Goto Layout "C"

Do NOT use the Today function. Use the Status ( CurrentDate ) function instead. You pay dearly for use of the Today function and I find that there is no longer a need for it.

Just say no.

Basically the Today function calls a internally stored calculation that is stored in every record of your DB. This recalculates everytime you open the file.

Status ( CurrentDate ) gives the same result, but is not stored and only calculated once as you use it.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

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