Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Week number of CurrentDate calculation?

Featured Replies

I cannot get a calculation to work. I would like to run a certain report every 4 weeks.

So for example if the week number of the current date is 4 or 8 or 12 etc.

Needs to be ISO calc to work in the uk so 'WeekOfYearFiscal'

How do I do this?

Week of year is not a good choice - unless you want to restart the count at the beginning of year. Try something like =

not Mod ( Div ( Get (CurrentDate) - 1 ; 7 ) ; 4 )

This may need adjustment depending on when you want the cycle to start.

  • Author

Could you please explain what 'not mod' and 'div' actually do here?

...and I would like it to restart each year.

Div () returns an (arbitrary) absolute number of week; not Mod ( week ; 4 ) returns 1 (True) for every 4th week, 0 (False) otherwise..

If you want to restart each year, try =

not Mod ( WeekOfYearFiscal ( Get (CurrentDate) ; 2 )  ; 4 )

  • Author

Div () returns an (arbitrary) absolute number of week; not Mod ( week ; 4 ) returns 1 (True) for every 4th week, 0 (False) otherwise..

If you want to restart each year, try =

not Mod ( WeekOfYearFiscal ( Get (CurrentDate) ; 2 )  ; 4 )

That's great, just tried this and it works perfectly.

Out of interest when I have a calc to name a pdf when running a script to save as pdf I want to display the 4 week period number. I currently have

(((WeekOfYearFiscal (DateField))+3) / 4)

which displays 5.25 or 9.25 or 13.25 etc ...instead of the 2, 3, and 4 I am looking for.

Why is this? what have I done wrong?

I currently have

(((WeekOfYearFiscal (DateField))+3) / 4)

which displays 5.25 or 9.25 or 13.25 etc ...

No, that's not possible. What you have is not a valid expression and the only thing it can possibly return is an error.

I want to display the 4 week period number.

Try =

Div ( WeekOfYearFiscal ( DateField ; 2 ) - 1  ; 4 ) + 1

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.