Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to programe a "Week of" in FM?

Status
Not open for further replies.

pt2huynh

Programmer
Feb 20, 2004
12
CA
Hi Everyone,

Is there a way in FileMaker Pro to extract the record creation date and will give us the "Week of" data?

Thanks.
 
Set up a field with auto-enter Creation Date.
What do you mean by "Week of"? Do you want to define the Week as beginning or ending on a specific day? So that the dates between Feb 23 and Feb 27 are regarded as Week of Feb 22?
If that is what you want let me know. I have a DB which uses a script to to find the date of the next Tuesday. Easy to modify for any day of the week.



Cheers,
Paul J.
 
Hi Paul,

That is exactly what I have in mind. Thank you for your reply.
 
Finds the first Tuesday after a given date

Set Field ("Date W'ending", "GivenDate")
Loop
Exit Loop if (DayName(Date W'ending) = "Tuesday")
Set field ("Date W'ending", "Date W'ending + 1"
End Loop

If you need a calculatino, you could put the same stuff into a (large) Case statement.

Cheers,
Paul J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top