title: The result of selection formula must be a boolean in Crystal Report
body: <p>I want to convert string to datetime in crystal report, I used Date(YYYY,MM,DD) and CDate(YYYY,MM,DD) like a <a href="http://www.kenhamady.com/form03.shtml" rel="nofollow">tip</a> but have error: <strong>The result of selection formula must be a boolean.</strong></p>
  
  <pre><code>stringVar dt := {Control_pmt_tlmytvResult.ngaydk};
  Date (Val (dt[1 to 4]),Val(dt[5 to 6]) ,Val(dt[7 to 8]))
  </code></pre>
  
  <p>Control_pmt_tlmytvResult is formatted string: YYYY-MM-DD HH:mm:ss</p>