title: How to pass date as a field in jrxml of JasperReports?
body: <p>I want to pass date as a field to the jrxml.
  Following is the code for it.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;xyLineChart&gt; 
      &lt;chart evaluationTime="Band"&gt; 
          &lt;reportElement x="0" y="0" width="555" height="500"/&gt; 
      &lt;/chart&gt; 
      &lt;xyDataset&gt; 
          &lt;dataset incrementType="None"/&gt; 
          &lt;xySeries&gt; 
              &lt;seriesExpression&gt;&lt;![CDATA["CpuUsageGraph"]]&gt;&lt;/seriesExpression&gt; 
              &lt;xValueExpression&gt;&lt;![CDATA[new java.util.Date($F{time}.getTime())]]&gt;&lt;/xValueExpression&gt; 
              &lt;yValueExpression&gt;&lt;![CDATA[$F{cpuUsage}]]&gt;&lt;/yValueExpression&gt;
          &lt;/xySeries&gt; 
      &lt;/xyDataset&gt; 
      &lt;linePlot&gt; 
          &lt;plot/&gt; 
      &lt;/linePlot&gt; 
  &lt;/xyLineChart&gt;
  </code></pre>
  
  <p>But it is not working.
  Its giving error as can not cast from date to number.
  Then how to convert it?</p>