Could you handle this regex. If you require the user to enter a date in a specific format, I could see the parsing of this string using the matlab regexp function to see if it matches the given format. In the case when you gave something like
s='31 Mar 2011 10:00:00.000' regexp(s,'\d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2}\.?\d*')
can be used to see if your date matches the format.
source share