title: Date to String <-> String to Date
body: <p>I get a Date of my database and I need to show it as a String.
  So in Flex I do this:</p>
  
  <pre><code>public static function dateToString(cDate:Date):String {
          return cDate.date.toString()+"."+
              cDate.month.toString()+"."+
              cDate.fullYear.toString()+" "+
              cDate.hours.toString()+":"+
              cDate.minutes.toString()+":"+
              cDate.seconds.toString();
  }
  </code></pre>
  
  <p>But I get for example the result:</p>
  
  <p>13.7.2010 0:0:15</p>
  
  <p>How can I fill the day, month, hours, minutes, seconds with padded 0?</p>
  
  <p>And, I go back from String to Date with:</p>
  
  <pre><code>DateField.stringToDate(myTextInput.text, "DD.MM.YYYY HH:MM:SS");
  </code></pre>
  
  <p>Is this correct? I want to have a Date which I will transfer via BlazeDS to a J2EE Backend, but I only see in the database then a null value. So something is going wrong...</p>
  
  <p>Best Regards.</p>