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

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

Recommended Posts

  • Newbies
Posted

I have a very simple database and would like to write a script to find all records for the last week (all records whose date is in the range "7 days ago ... today's date").

I can do it all except the "7 days ago" bit. Any suggestions gratefully received.

Posted

Enter Find Mode []

Set Field [ YourDate; "≥" & Get ( CurrentDate ) - 7 ]

Perform Find []

Posted (edited)

If you have dates greater than today's date then you'll need a range so change would be:

Set Field [ YourDate; [color:black]"≥" & Get ( CurrentDate ) - 7 [color:green]& ".." & Get ( CurrentDate ) ]

Hi John!! :laugh2:

Ooops! I forgot to remove the part in bold black!!

Edited by Guest
Posted

It could get more complicated if when it's Wednesday and you want last week's records, you really want Monday-Friday of the last week.

  • Newbies
Posted

Wow ... thanks Mr Vodka, and the rest who replied. I don't fully understand what I did, but I followed the instructions and after a couple of screw ups ... it worked!

Totally cool! Thanks again. Great forum.

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