If a date is between 2 dates, then this, else...?

hi Nikki, we did not see you for a while, good to have you back. I’d like to propose a dynamic solution like below. The 14 is hard coded, but of course you can replace this by a variable by referencing a column that holds the day number.

below the code tha handles the months.

If(thisRow.paydate.Day() < 14, Format("Pay Period {1} 14 - {2} 15",thisRow.paydate.EndOfMonth(-1).MonthName(), thisRow.paydate.EndOfMonth(0).MonthName()),Format("Pay Period {1} 14 - {2} 15",thisRow.paydate.EndOfMonth(0).MonthName(), thisRow.paydate.EndOfMonth(1).MonthName()))

enjoy your weekend, Christiaan

1 Like