Skip to main content

Posts

Showing posts with the label datetime

How do I determine if a string is date format?

I have some strings like this: 2012-02-05T07:42:47.000Z mixed with other strings. It is always in this format. (but the numbers are not the same, of course...the times are different) (not Sun, 05 Feb 2012 07:42:47 GMT ) I want to know whether a string matches that format. How can I determine that? It's so complicated with the colons and dots and stuff.