Convert Date to String using simpledateformat
<p>Issue with converting date to string into another format.</p>

<pre><code>lastDownloadDate&gt;&gt;Wed Feb 27 16:20:23 IST 2013
lastChangeDate&gt;&gt;Wed Feb 27 15:11:00 IST 2013
</code></pre>

<p>I want to convert this format to another format. yyyy-mm-dd HH:mm:ss.</p>

<p>when i try to covert it i m getting different result.</p>

<p>DateFormat outputFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");</p>

<pre><code>String lastDownloadTimeVal = outputFormat.format(lastDownloadDate);
System.out.println("lastDownloadTimeVal&gt;&gt;"+lastDownloadTimeVal);
String lastChangeTimeVal = outputFormat.format(lastChangeDate);
System.out.println("lastChangeTimeVal&gt;&gt;"+lastChangeTimeVal);
</code></pre>

<p>i m getting wrong result here because month is replacing with minute.</p>

<pre><code>lastDownloadTimeVal&gt;&gt;2013-20-27 16:20:23
lastChangeTimeVal&gt;&gt;2013-11-27 15:11:00
</code></pre>
