Converts a String to DateTime, validating input format.
DateTime extractDateTime(dynamic value, String errMsg);