Bill

Set Variable [ $CheckDate; Value:Library::CheckoutDate ] 
Set Variable [ $Now; Value:Get ( CurrentDate ) ] 
Set Variable [ $LoopDate; Value:$CheckDate ] 
Loop
        If [ DayOfWeek ( $LoopDate ) = 1 or DayOfWeek ( $LoopDate ) = 7 ] 
#Saturday or Sunday do do nothing
Else
        Set Variable [ $Days; Value:$Days + 1 ] End If
        Set Variable [ $LoopDate; Value:$LoopDate + 1 ]
        Exit Loop If [ $LoopDate > $Now ] 
End Loop
Show Custom Dialog [ Message: "Checked out for " & $Days & " Days"; Buttons: 
“OK” ]

Stephen

----------

"The nice thing about standards is that you have so many to choose from." 
-Andrew S. Tanenbaum, Computer Networks, 2nd ed, p.254





On Sep 16, 2010, at 10:36 AM, Stephen Wonfor wrote:

> Bill
> 
> A calculation with Get(CurrentDate) - CheckoutDate would work.
> 
> Stephen
> 
> -----
> 
> "Rivers know this: there is no hurry.  We shall get there someday." --- A.A. 
> Milne
> 
> On Sep 16, 2010, at 10:15 AM, Bill Wallace wrote:
> 
>> I have been going through the filemaker knowledge base but cannot seem to 
>> find a solution to counting days. I would like to be able to count the days 
>> in a script so that when a student has a book out for 21 days or more from 
>> the checkout date. Then I would be able to red flag the student, until the 
>> book is returned.
>> 
>> Thanks,
>> Bill Wallace
>> Manzano Day School
>> Albuquerque  NM
>> [email protected]

Reply via email to