Newbies helena Posted March 6, 2001 Newbies Posted March 6, 2001 is it possible to write a script that will note what today's date is, then find all records within a month of today's date? I have only been able to do this if I input a specific date into the script, but I want it to work from whatever date is today. I need it to show all records a month from the day i access the file. Thanks!
BobWeaver Posted March 6, 2001 Posted March 6, 2001 Your script should look like this: Enter Find Mode Insert Text [YourDateField, ">="][select entire contents] Insert Calculated Result [YourDateField, Today-30] Perform Find Note, the proper "greater than or equal to" symbol which doesn't display properly here should be substituted for ">=" You must use the Insert command rather than the Set Field command when entering a date range into a date field. [This message has been edited by BobWeaver (edited March 06, 2001).]
TyGuy Posted March 6, 2001 Posted March 6, 2001 I used the following script successfully: Enter Find Mode[ ] Insert Calculated Result [select, "DateField", "DateToText(Today)& "..." & DateToText(Today+30)" Perform Find [ ] Ignore the calculation instruction that the result must be a date. Entering a text string into the date field works for the find.
BobWeaver Posted March 6, 2001 Posted March 6, 2001 Oh right! TyGuy assumed 30 days in the future, and I assumed 30 days in the past. Oh well, you can take your pick.
Vaughan Posted March 6, 2001 Posted March 6, 2001 Can I suggest that Status(CurrentDate) be used instead of Today function. Today is only calculated when the db is first launched, so it breaks if the file is left open for more than 24 hours.
Newbies helena Posted March 7, 2001 Author Newbies Posted March 7, 2001 Thanks for all your help! Much appreciated.
Recommended Posts
This topic is 8667 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