title: Custom date format cannot be parsed. (Java)
body: <p>I have to use a custom date format in Java. It contains microseconds although Java doesn't provide support for microseconds. Because of that I filled the time pattern with zeroes, which work fine when formatting, but I cannot parse date-strings with that pattern.</p>
  
  <p>Is there a simple workaround or must I handle microseconds on my own (with String functions)?</p>
  
  <pre><code>@Test
  public void testDateFormat() throws ParseException {
      DateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSS000");
      String theDate = format.format(new Date());
      // this will fail:
      format.parse(theDate);
  }
  </code></pre>
  
  <blockquote>
    <p>java.text.ParseException: Unparseable date: "2010-01-25-12.40.35.769000"</p>
  </blockquote>