Java: How to delete all the characters after one character in the String
<p>I have a String which contains a date for exemple 01-01-2012 then an space and then the time 01:01:01. The complet string is: "01-01-2012 01:01:01"</p>

<p>I would like to extract only the date from this string so at the end I would have 01-01-2012 but don't know how to do this.</p>

<p>Thank you</p>
