0

I'm working on a SharePoint Online and I've a date field that I need to validate if the date insert by the user matches to the current month.

I have this formula:

=TEXT([Date],"mmmm")  ->This return the month 

How do I compare this to the current month ?

1

You can use the MONTH function, it will return the month number. With this, there is also NOW() for the current date. Combining the two will get you the current month.

Now insert that in the column validation section. Return TRUE if it's ok, and false to show a message and block submit.

=IF(MONTH(NOW())<>MONTH(date),FALSE,TRUE)

On the logical side, don't forget to also check the YEAR if you want to be sure that it is the same month.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.