Forum Discussion

paobmmc's avatar
paobmmc
Tin Contributor
Dec 19, 2023

SharePoint Column Validation with dates

Hi, I'm trying to validate the value of the column based on the current day and month.

But I'm nowhere to get the formula right based on what the field expects

 

If( (Day(Today()) < 20 && Month([TimeSlot_1]) = Month(DateAdd(Today(), 1, TimeUnit.Months))) ||  (Day(Today()) >= 20 && Month([TimeSlot_1]) = Month(DateAdd(Today(), 2, TimeUnit.Months))),
true,
false)

 

The draft of the formula is:

If today's day < 20 and month equals to current month + 1 return true

If today's day >= 20 and month equals to current month + 2 return true

return false

 

Could you please help me validate this column?

Thank you.

No RepliesBe the first to reply