Doug Patrick Posted March 7, 2001 Posted March 7, 2001 I am trying to find a range of dates automatically in a script. When I execute the script I get a question mark in the date, and a statement that no records match the request. The script reads: . . Enter Find Mode [] Set field ["date","Date(Month(Today),Day(Today-5),Year(Today))..Date(Month(Today),Day(Today),Year(Today))"] Perform Find [] How do I go about scripting this to find the last five days?
BobWeaver Posted March 8, 2001 Posted March 8, 2001 You were on the right track. The only problem is that you can't use Set Field when you have a date range. You have to use Insert Calculated Result instead. It's a Filemaker quirk. Use this: Insert Calculated Result [date, DateToText(Status(CurrentDate)-5)&"..."&DateToText(Status(CurrentDate))] Status(CurrentDate) is better than the Today function, because the Today function doesn't update if you leave Filemaker running past midnight, while Status(CurrentDate) is always correct.
StevenB Posted March 8, 2001 Posted March 8, 2001 Hey Doug, I remeber seeing some tip files on the web about performing finds using a date range. Go to www.databasepros.com and check out the resources. Search on the word date and it will bring up some tip files related to dates and date ranges. Good Luck. Steven B
Recommended Posts
This topic is 8931 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