October 15, 200718 yr 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
October 15, 200718 yr 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)) ]
Create an account or sign in to comment