Find the first Day of the month following a date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to make a field equal to the first day of the month
following a set date. I have a variable [Hire Date] and I am trying to
determine when a person with this hire date will be eligible for benefits.
That date would be [Hire Date] +91 days but it would be the first day of the
next calendar month. Any ideas how to do this would be greatly appreciated.
 
DateSerial(Year([Hire Date] + 91), Month([Hire Date] + 91) + 1, 1)

Actually, should 91 days BE the 1st of the month, that will give you the
first of the next month, so you might want to use:

IIf(Day([Hire Date] + 91) = 1, [Hire Date] + 91, DateSerial(Year([Hire Date]
+ 91), Month([Hire Date] + 91) + 1, 1)
 
dtmBenefits = DateAdd("d", 91, dtmHireDate)
dtmBenefits = DateSerial(Year(dtmBenefits),Month(dtmBenefits)+1,1)
 
Back
Top