Newbies Surya_CS Posted April 4, 2008 Newbies Posted April 4, 2008 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.
mr_vodka Posted April 4, 2008 Posted April 4, 2008 Enter Find Mode [] Set Field [ YourDate; "≥" & Get ( CurrentDate ) - 7 ] Perform Find []
LaRetta Posted April 4, 2008 Posted April 4, 2008 (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!! Ooops! I forgot to remove the part in bold black!! Edited April 4, 2008 by Guest
bcooney Posted April 4, 2008 Posted April 4, 2008 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 Surya_CS Posted April 4, 2008 Author Newbies Posted April 4, 2008 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now