Formula for first of the month following a 30 day probation period.

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I need help with a formula that will give me the first day of the following month following a 30 day period.  For example, if an employee starts on Jan 9, they are not eligible for ins until the first of the month after their 30 days are up.  So this person would be eligible March 1.  Can someone help.  Thanks in advance.

Photo of Daniel

Daniel

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 800 Points 500 badge 2x thumb
Say you have a Date field called [Start Date].


Try this for the formula:


var Date ProbationExpirationDate = [Start Date] + Days(30);

var Date EligibilityDate = FirstDayOfMonth($ProbationExpirationDate);

If ( $EligibilityDate <= $ProbationExpirationDate, 


AdjustMonth( $EligibilityDate, 1 ),

$EligibilityDate

)

ProbationExpirationDate  is 30 days after your [Start Date].


EligibilityDate is the first day of the month for ProbationExpirationDate.

If EligibilityDate is before ProbationExpirationDate, then it really should be the next 1st of the month, so we use AdjustMonth function to do that.  Otherwise we can just use EligibilityDate as is.
Photo of Daniel

Daniel

  • 0 Points
Omg , that worked Perfect.  Thank you so much
Photo of Xavier Fan

Xavier Fan, Champion

  • 800 Points 500 badge 2x thumb
Great!