title: How to get month number from month string in Java?
body: <p>I've got this string </p>
  
  <blockquote>
    <p>23/Gennaio/2014</p>
  </blockquote>
  
  <p>and I need this other string</p>
  
  <blockquote>
    <p>23/01/2014</p>
  </blockquote>
  
  <p>I tried <strong>using joda.time</strong>:</p>
  
  <pre><code>DateTimeFormatter format =  DateTimeFormat.forPattern("dd/MMM/yyyy").withLocale(Locale.ITALY);
  DateTime instance = format.parseDateTime("23/Gennaio/2014");  
  String month_number = String.valueOf(instance.getMonthOfYear());
  </code></pre>
  
  <p>But I get this exception:</p>
  
  <blockquote>
    <p>01-06 13:31:55.341: E/AndroidRuntime(1116): java.lang.IllegalArgumentException: Invalid format: "23/Gennaio/2014"</p>
  </blockquote>
  
  <p>What am I missing?</p>