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
Vanessa81Vanessa81 

Custom Formula field to calculate calendar week as a date

I am trying to create a custom formula field that would calculate the calendar week based of the created date field.  Ideally I would like a created date of 6/13/2013 to yield a value of calendar week value of 6/9/2013.  I am not sure if this is even possible.  If not another option would be to put it as a date range so 6/13/2013 would return a calendar week value of 6/9/2013 - 6/15/2013.

 

Any help on this would be appreciated.

 

Thanks!

@anilbathula@@anilbathula@
hi

try this formula
CreatedDate - MOD(createdDate - DATE(1900, 1, 7), 7)
apkv1234apkv1234

Hello,

Please try the below formula and this should work for you.
(MOD(FLOOR((DateValue(CreatedDate)-7-DATEVALUE("2000-01-01"))/7),52))+1

 

This formula would give you the week in which the the record was created.. For eg: if an opportunity was created on 31st jan 2013 the output would be displayed as 5 which means that the calender week was 5 for that particular month. Please let me know if this answers your question.

Regards,
APKV