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 4386 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

seems simple ...

 

There's week of year function,,

 

How do I get  get Week Of Month ?

 

 

 thank you

Posted
There's week of year function,,

 

There are actually two week-of-year functions, WeekOfYear () and WeekOfYearFiscal(), giving altogether eight possible ways to define "week of year". How do you want to define "week of month"?

Posted

for instance what week is may 27  what

 

weekof month()   

 

===   5th week of month    etc

 

 

and thanks this sunday

Posted
for instance what week is may 27

 

2012 or 2013 ?

Because 05/27/2012 was Sunday, 05/27/2013 will be Monday,

 

Also, what about 05/27/2006 ?

Posted
for instance what week is may 27  what

 

weekof month()   

 

===   5th week of month    etc

 

 

and thanks this sunday

 

 

That's not really an answer. I am going to take a guess here and suggest =

 

Let ( [
firstOfMonth = Date ( Month (  date ) ; 1 ; Year ( date ) ) ;
sun = firstOfMonth - DayOfWeek ( firstOfMonth ) + 1
] ;
Div ( date - sun ; 7 ) + 1
)

 

This behaves in a manner similar to WeekOfYear() i.e. a week starts on Sunday and fractions of weeks occurring at the beginning or end of the month count as full weeks,

Posted

To re-iterate comments point that the answer to this question depends entirely on how you want to define "week of month", here is a real-life example:

Min (
	Ceiling ( Day ( Get ( CurrentDate ) ) / 7 ) ;
	4
)

 

In this case, I needed the first 7 days of the month to be the first week, next 7 the second week and so on, returning a max value of 4, regardless of how many days were in the month. This was a very particular scenario, though, so I wouldn't expect it to be what you were looking for, but we can't know that without clarification of the question.

  • Like 1
  • 2 weeks later...
Posted

thanks thats exactly what i need.. thought I ask right.. id would know this math statement.. 

This topic is 4386 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.