Himitsu Posted August 23, 2003 Posted August 23, 2003 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?
Fenton Posted August 23, 2003 Posted August 23, 2003 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.
Himitsu Posted August 24, 2003 Author Posted August 24, 2003 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.
peg Posted September 10, 2003 Posted September 10, 2003 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.
Recommended Posts
This topic is 7744 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