public static DateTime parseDateTimeChoice(String value) throws NumberFormatException {
  NumberFormatException exception;
  try {
    return DateTime.parseDateTime(value);
  }
 catch (  NumberFormatException e) {
    exception=e;
  }
  try {
    return DateTime.parseDate(value);
  }
 catch (  NumberFormatException e) {
    exception=e;
  }
  throw exception;
}

public static DateTime parseDateTimeChoice ( String value ) throws NumberFormatException { NumberFormatException exception ; try { return DateTime . parseDateTime ( value ) ; } catch ( NumberFormatException e ) { exception = e ; } try { return DateTime . parseDate ( value ) ; } catch ( NumberFormatException e ) { exception = e ; } throw exception ; }
parses an xml value that ' s either an xs : date or xs : datetime string .
