how to use specific date formats in data validation in Google Sheets. I set this date format in google sheet dd-mmm-yyyy (09-Jan-2023) but the user enters a different date format in the sheet so im want to use data validation for this the user must enter data in specific format dd-mmm-yyyy
i want that when user enter data in different format its auto rejects entry.
CodePudding user response:
try:
=REGEXMATCH(A1&""; "\d{2}-.{3}-\d{4}")
or:
=REGEXMATCH(A1; "\d{2}-.[A-z]{3}-\d{4}")
CodePudding user response:
If you previously set the date format in the range you want, then no matter in which way the date is inserted then it will be displayed as you wish. Specially with mmm format you'll be always at risk that they can mess with how the month is supposed to be written, I think it's preferably for them to insert the number and you choose how it is displayed