Hi John,

I have a similar issue where the week runs from Friday through Thursday. What I do is set a field to contain the date for the start of the week. Then I can compare any date to that date and determine if it is in the work week or not. As part of this in the start up script for the DB I check the start of week date against the current date. If the date is greater the start of week + 7, I update the start of week.

In your case, if would use a date/time stamp for the start of week and set the time part to be 16h00.
The start of week date is determined by this formula.
set Variable [$weekstart; Value:div(Get(CurrentDate) - DayofWeek(Get(CurrentDate));7)* 7 + 5] I then use the $weekstart variable to set the new start of week. I got the original idea for this setup from The Support group. Here is a link to the article that describes the fundamentals of this approach. http://www.supportgroup.com/getanswers/sample.php#weekstart

In your case I would use the $weekstart variable as the date portion of a Timestamp.

I hope this helps. If you need help with scripting, let me know and I'll be happy to work with you.
Best regards
Bruce Herbach

John Wenmeekers wrote:
Intro:

I calculate the Saturday out of a weeknumber and a year.
From that given date I can calculate the Sunday of the given weeknumber.

I use those two values in a CF to calculate the range of dates from Sunday to Saturday for the given weeknumber (and year).

All of this is working fine and perfect.

But now I need as basis a week that starts at Friday 16h00.....

Wow, my week doesn't go from Sunday 0h00 to Saturday 24h00, but from Friday 16h00 to the next week Friday 16h00 (or 15.59.59 if you want)

Any idea how to tell FileMaker that in the context of the above calculation and CF ?

More than thank you...

JW

Reply via email to