August 23, 200322 yr I have probably a very easy question... I have a field for all my students that contains their birthdates. What I want to do is perform a find, lets say if I wanted to see all the students who have birthdays in August. I went into find and that field I typed 08, August, ect... but nothing. the field is set a a Date field. could it be because of that?
August 23, 200322 yr Here's one way to do it in a Find script. _gMonthNum is a global field, to put the number of the month. Insert Calculated Result ["Birthdate", " DateToText( Date( _gMonthNum, 1, Year(Status(CurrentDate)) ) ) & ".." & DateToText( Date( _gMonthNum + 1, 0, Year(Status(CurrentDate)) ) ) "] Birthdate must be on the layout, but can be hidden. Date( _gMonthNum + 1, 0, Year(Status(CurrentDate)) ) is a way to say "last day of this month," 0 being a special expression to compensate for variable days in a month; so we get the last day of the month before next month. DateToText is 'cause you can only enter "text" in a date field with a script (FileMaker normally "coerces" your text to date, but can't in a script). Alternatively you can avoid all this by creating a field _cMonthNum = Month(Birthdate). Then you can just search for 8. Easy.
August 24, 200322 yr Author Well, all of you here on this forum have again solved my problem.... amazing. I got more info here than all the books I have bought for this program. Thanks a ton Fenton.
September 10, 200322 yr Himitsu, this is a little late, and you may not even read it, but another possible option appears to be searching in the birthdate field for everything between August 1 and August 30.
Create an account or sign in to comment