Check if date is in dd/MMM/yyyy format

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

Then use in the If Condition

Regards
Sudharsan

1 Like

Hi, how about if only accept “/” in between, without “.” or “-”

@TyraS

Check as below

Hope this may help you

Thanks

1 Like

@TyraS

As You can try @Srini84 suggestion

@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