How to prepend number with zero
<p>I have the below script running and the following logcat report as at the moment it is not working. Could someone help me get this working and if possible also explain what I am doing wrong.</p>

<pre><code>     Calendar calendar = Calendar.getInstance();
         sdf = new SimpleDateFormat("mm");
         NValue = sdf.format(calendar.getTime());
         NValue = String.format("%02d", NValue);
</code></pre>

<p>Logcat report:</p>

<pre><code>05-10 14:02:52.281: E/AndroidRuntime(295): java.util.IllegalFormatConversionException: d is incompatible with java.lang.String
</code></pre>
