Bikeman17 Posted October 15, 2007 Share Posted October 15, 2007 Hi I am in the process of converting my FM6 databases to FM9. I was used to use date strings to get sale reports for a specific time period. I had to replace Today by Status (CurrentDate). For example, I use this calc string to perform a search for the previous month. DateToText(Date(Month(Status ( CurrentDate )) - 1; 1; Year(Status ( CurrentDate )))) & "..." & DateToText(Date(Month(Status ( CurrentDate )); 1; Year(Status ( CurrentDate ))) - 1) The result is 09/01/2007...09/31/2007 When I use the above string with a Set Field command, the result is not what expected because the Date field is in date format. So, I need to change the string in order to make it work with a Set Field command. Any suggestion is welcome Link to comment Share on other sites More sharing options...
Fenton Posted October 15, 2007 Share Posted October 15, 2007 You can use Insert Calculated Result [your calculation]. It mimics the user actually typing. Hence the date field has to be on the layout. You will find that later versions of FileMaker are much more forgiving and flexible about date Finds. You CAN use Set Field in later versions, and the date field does not need to be on the layout; this will work: Enter Find Mode [] Set Field [ Date_; GetAsText ( Get (CurrentDate)) & ".." & GetAsText ( Get (CurrentDate) + 1) ] Perform Find [] As will: Set Field [ Date_; ">" & GetAsText ( Get (CurrentDate)) ] Link to comment Share on other sites More sharing options...
comment Posted October 16, 2007 Share Posted October 16, 2007 You can also use wild cards, e.g. "09/*/2007". Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6165 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