String to Date Conversion Problem
<p>I am trying to convert the following string in to date, I am able to convert the string into to date object successfully,But the Problem is in this string I want to convert the time in to am/pm i.e. 12 hr format, I tried different ways but unable to get the solution.</p>

<p>How to get the 12hr format time from this string ?</p>

<p>Here is my code:</p>

<pre><code> SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd hh:mm:ss zzz yyyy"); //please notice the capital M
 Date date;
 try {
      date = formatter.parse("Fri Jul 01 10:00:00 CDT 2011");
      Log.e("ThankYou Block", ""+date.toString());
 } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
 }
</code></pre>
