 Finding weeks since date

What formula would you use to find the number of weeks since a prior date?

E.g.: Weeks since 9/30/20 with the end date being today's date.

To find the difference between dates, you want to use the {time: X} command which gives you the date in seconds.

Find the weeks from the selected date:

{formdate: YYYY-MM-DD; default=2020-09-30; name=date}

{ time: X} is the current date in seconds, { time: X; at={ =date}} is the selected date in seconds. We subtract one from the other to get the seconds between them.

We use "/ 60 / 60 / 24 / 7" to convert seconds into weeks.

Weeks to today from the selected date: {= ({time: X} - {time: X; at={=date}}) / 60 / 60 / 24 / 7; format=.2f}

"format=.2f" rounds to two decimal places. You could use "format=.0f" to round to a whole number.

Or if you wanted to hardcode the date rather than using a form selector:

{=({time: X} - {time: X; at=2020-09-30}) / 60 / 60 / 24 /7; format=.2f}

Scott, thank you for your response!

Hi Scott, I've seen two of your solutions to the date issue that work this way. I'm trying to figure out how to exclude weekends, which is possible using the date calculator, but not this method, to my knowledge.
Do you know a way to do it?

I've replied to your post in the suggestions forum but I'm going to repeat it here for the benefit of those people following this thread:

This can already be done. The skip needs to be right after the days (because it only applies to days). And you need to use shift and a minus sign to subtract, since you're going back in time.

{time: MM-DD-YYYY; shift=-1M-12D(skip=SAT, SUN)-21Y}

Hope this helps 