Convert a string to a DateTime.
The string is assumed to be an ISO-8601 date-time representation in extended format. For example, 2019-08-22T18:00 or 2019-08-22 18:00:30.123456789. The output of DateTime.toString can be safely parsed using this method.
2019-08-22T18:00
2019-08-22 18:00:30.123456789
Converts a string to a DateTime using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Any custom parser must be capable of supplying the fields necessary to resolve both a Date and Time.