Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7248 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to figure out how to calculate a date from a week #.

I have a simple calendar that I can switch from one week to the next. So if I am on week 14 I want it to calculate the date of Monday on that week (3/28/2005).

Thanks,

Posted

Assuming your week# is the same as Filemaker's WeekOfYear, and that it refers to the current year, the date of Monday is:

Date ( 1 , 1 , Year ( Status (CurrentDate) ) )

- DayOfWeek ( Date ( 1 , 1 , Year ( Status (CurrentDate) ) ) )

+ 7 * ( week - 1 ) + 2

Posted

Thanks, that worked. Only problem is I don't understand exactly how it worked.

Is there any chance you could just line item what it is doing in lay terms?

Thanks so much.

Posted

// THE DATE OF NEW YEAR

Date ( 1 , 1 , Year ( Status (CurrentDate) )

// MINUS THE DAY OF WEEK OF NEW YEAR

- DayOfWeek ( Date ( 1 , 1 , Year ( Status (CurrentDate) ) ) )

// IS THE SATURDAY BEFORE NEW YEAR

+ 7 * ( week - 1 )

// IS THE SATURDAY BEFORE THIS WEEK

+ 2

// IS THE MONDAY THIS WEEK

This topic is 7248 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.