function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TilluTillu 

How to give Completed calender weeks in formulae field?

In formulae field i want to use  completed calender weeks , But i dont know how to give in the formulae. Any one help please.

From  this year staring  1/1/2014   to  Last Friday 3/7/2014. we have  10 calender weeks.

So in my formulae i need to give something like   Amount / Calender weeks  .

But how to give this 10 (Calender weeks)  here. Because for every record it varies.
Here-n-nowHere-n-now
Let's say your start date field is start_date__c and your end date is end_date__c, then the calculation formula would be
floor((end_date__c - start_date__c)/7)

Subtracting dates gives you the days in between.  The floor() function makes sure it only rounds down, giving you only the whole weeks.