Jump 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.

Is date field is xth day of month?

Featured Replies

Hello all.

 

I want a script or custom function to calculate: 

whether a specific day is xth day of month?

 

For e.g.

 

If date field is 2nd (xth) Monday (any day) of month - Result should be true

otherwise it should result into false.

 

If there would be any custom function, it will be great!!

 

Thanks.

 

If date field is 2nd (xth) Monday (any day) of month - Result should be true

otherwise it should result into false.

 

The temptation here is to start by calculating the actual date that is the x-th weekday of the given month. That is certainly possible, but not as easy as the alternative - considering you only want a true-or-false result. So we only need to test for:

  • is the given date the requested day-of-week?
  • is the given date in the requested week of the month?
DayofWeek ( Datefield ) = weekday
and
Ceiling ( Day ( Datefield ) / 7 ) = x

where weekday is a number between 1 (Sunday) and 7 (Saturday) and x is the number of the occurrence you are looking for. 

use the above custom function as a base for a calc field

 

Actually, it was the other way around.

Oh that is a sweet one, Michael!

Create an account or sign in to comment

Important Information

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

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.