title: How can i get data in format "YYYY-MM-DD 00:00:00.0" using class Date?
body: <p>How can i get data in format "YYYY-MM-DD 00:00:00.0" using class Date (it's extremly important to use exactly this class)?</p>
  
  <p>I tried to do everything i can think of: </p>
  
  <pre><code>SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
  df.format(date)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>String pattern = "yyyy-MM-dd HH:mm:ss.S";
  SimpleDateFormat format = new SimpleDateFormat(pattern);
  try {
  Date date = format.parse("2011-01-18 00:00:00.0");
  } catch (ParseException e) {
  e.printStackTrace();
  }
  </code></pre>
  
  <p>byt when i print date using logger i get this format "Tue Sep 30 00:00:00 MSK 1913".</p>