Jump to content

Finding Dates


srtackett
 Share

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

Recommended Posts

I am trying to create a report where the user can click a button and bring up a report of all newly created records within the past 7 days.

The only thing I need to know is how to find the correct date range. The range should read: TodaysDate - 7 days to TodaysDate (or >TodaysDate - 7 days.

In FM 3 how does this work? (//-7)..// doesn't do the trick. Can this be done?

Thanks.

Link to comment
Share on other sites

I do it by having a calculated field to show the days since the record was created (or in my case since a particular check was carried out). The calculation is simply:

Today - Creation Date

You can then find all records with a value >7 in the Days Since Created field

Link to comment
Share on other sites

John-

If you do the search in the way you explain, won't you have a very long search (especially in a database with a lot of files)? By making the calculation based on the days elapsed field, the search is happening on an unindexable field. If the database had to index the field everytime the report is run, it would probably be very tedious.

Why not just promt the user for the date you want to start from & then have the script find the desired date range?

Just a thought...

Later :-)

Link to comment
Share on other sites

This topic is 7547 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.