How do i check if a date/String is in the correct Format: dd/MMM/yyyy.
Hi @TyraS
You can use Regex for checking the format
Use Is match Activity
- Pass your String Variable
- Pass the below pattern
- Returns Boolean
regex101: build, test, and debug regex
Then use in the If Condition
Regards
Sudharsan
2 Likes
Hi, how about if only accept “/” in between, without “.” or “-”
1 Like
@TyraS - Below code will give true or False…
DateTime.TryParseExact(YourString,“dd/MMM/yyyy”,Nothing,Globalization.DateTimeStyles.None,Nothing)
Since September does not has 31st, it gave False in the 3rd statement…
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.