title: Cannot invoke format(Date) on the primitive type void
body: <p>In the jasper Report I am trying the following </p>
  
  <p><code>new SimpleDateFormat("dd.MM.yyyy HH:mm").setTimeZone(TimeZone.getTimeZone("UTC")).format( new Date(1483337940000L));</code> </p>
  
  <p>in the text field Expression.</p>
  
  <p>But I am getting the error </p>
  
  <blockquote>
    <p>Cannot invoke format(Date) on the primitive type void</p>
  </blockquote>
  
  <p>Is not it  the same as the following code in java?</p>
  
  <pre><code>1483337940000L is 02.01.2107 07:19
  
  SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm");
  sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
  String test  = sdf.format(new Date(1483337940000L)); // Here I am getting 06:19
  
  String test2 = new SimpleDateFormat("dd.MM.yyyy HH:mm").setTimeZone(TimeZone.getTimeZone("UTC")).format( new Date(1483337940000L)); // Here I am getting the error Cannot invoke format(Date) on the primitive type void
  </code></pre>