How to display date and time(12 hour format) from seconds in java
<p>Hi i have seconds as follows</p>

<pre><code>long seconds = 1299671538L;
</code></pre>

<p>using the above seconds i want to display the date and time(12 hour format).I have written code as follows</p>

<pre><code>    SimpleDateFormat formatter = new SimpleDateFormat(
                    "EEEE, MMMM d, yyyy HH:mm,a", Locale.getDefault());

    String dateString = formatter.format(new Date(seconds * 1000L));

    System.out.println(dateString);
</code></pre>

<p>I am getting output as Wednesday, March 9, 2011 17:22,PM.</p>

<p>But i want to display Wednesday, March 9, 2011 05:22,PM(12 hour format)</p>
