title: How to delete all the characters after one character in the String?
body: <p>I have a String which contains a date, for example "01-01-2012", then an space and then the time "01:01:01". The complete 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>