Skip to main content
Question

How to find no of Sundays in a Month

  • March 19, 2020
  • 0 replies
  • 955 views

Hi,
I want to find the count of how many Sundays are there in a month basis on which i would like to find out No of Days in a month - No of Sundays.

I have created a daily data entry form in which the user will enter the date. I would like to find out how many sundays will occur in that given month for which the date is entered.

For Example if the user enters the date as 15.03.2020 then March 2020 has 31 days and 5 Sundays so 31-5=26 should be my end result.

Is there a way thru which the same can be achieved?

Regards
Gunsham

------------------------------
Gunsham Lakhiani
------------------------------

  • Quickbase Alumni
  • April 1, 2020
Hi, I think I have a solution in the screenshot below. The formulas are to the right of the fields

Enter any date in field Date2
calculated date field bom-date2= FirstDayOfMonth([Date2])
Day of week-bomdate2 =DayOfWeek([bom-date2])
eom-date2 = LastDayOfMonth([Date2])
days in date2 month=ToDays([eom-date2]-[bom-date2])+1
first sunday of month= Case([Day of week-bom-date2],0,[bom-date2],
1,[bom-date2]+Days(6),
2,[bom-date2]+Days(5),
3,[bom-date2]+Days(4),
4,[bom-date2]+Days(3),
5,[bom-date2]+Days(2),
6,[bom-date2]+Days(1)
)
Sundays =Ceil(ToDays([eom-date2]-[first sunday of month])/7)
Days in month - no Sundays = [days in date2 month]-[Sundays]


------------------------------
Lisa Sell
------------------------------

bensimon
Forum|alt.badge.img+14
  • Quickbase Alumni
  • June 5, 2025

Found this oldie but goodie and wanted to surface it to the top for others to see. Some really cool stuff being done here with Days of the Week and formulas!