title: Grails - Convert String data to Date
body: <p>Lets say, i have a "Book" class with field "availableOn"(as shown below). </p>
  
  <pre><code>class Book {
      String availableOn;
  }
  </code></pre>
  
  <p>The fields holds values </p>
  
  <ul>
  <li>"All days" or</li>
  <li>String representation of a date. For example "13/06/2012"</li>
  </ul>
  
  <p>How can i get all Books that are available within next two days? The below code would throw an exception ("java.util.Date cannot be cast to java.lang.String")</p>
  
  <pre><code>def books = c.list(){
      between('availableOn', new Date(), new Date() + 2)
  }
  </code></pre>
  
  <p>PS : Am working on a legacy DB, and so am not suppose to change the schema :(</p>