View the original community article here
Last tested: Nov 29, 2019
There's no built-in diff_weeks function, so it's best to use a custom formula:
floor(diff_days(${view_name.start_date}, ${view_name.end_date)/7)
This formula simply divides the day difference by 7 and rounds down to the nearest whole number.
This content is subject to limited support.