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.

How many day in the last week of a month

Featured Replies

Is there a way to calc how many days are there in the last week of month by using a date field? i.e. 3/29/2004 is the forth week of the month but how many days are in that week for that month???? Answer is 3.

I'm assuming that the week starts on Sunday, not Monday.

Learn about the DayOfWeek function. It'll probably give you the answer. To find the last day of any month, calculate the first day of the next month and subtract one day.

Errr, by my calculations there are 5 weeks in February 2004, and there is 1 day in the last week. Unless I've got it wrong...

  • Author

Thank you. I meant march, I changed by post.

Hi tdignan,

(WeekofYear(YourDate)-WeekofYear(Date(Month(YourDate), 1,Year(YourDate)))) + 1

Lee

Here's my calc, assuming Sunday start of week. Day of Week returns a number, 1 being Sunday, 7 being Saturday, so determine day of week of last day of month (first day of next month - 1). This number would coincidentally also be how many days in the week.

DayofWeek(Date(Month(OurDate) + 1, 1, Year(OurDate)) - 1)

Or:

DayofWeek( Date(Month(OurDate) + 1, 0, Year(OurDate)) )

Day zero of any month is the last day of the prior month.

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.