Jump to content
We've recently updated our Privacy Statement, available here ×

java.sql.timestamp problem


nkrowe

Recommended Posts

This is my expression in the expression editor: $F{classes_class_begin_date} + " -- " + $F{classes_class_end_date}

Both classes_class_begin_date and classes_class_end_date are class java.sql.Timestamp

When I run the report, I get the error: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression.

Either field works ok alone but when I combine them (as above) I get the error. An I combining the wrong???

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I finally got it to work by adding some format to the expression.  Here is the result:

new java.text.SimpleDateFormat("EEE, d MMM yyyy, hh:mm aa").format($F{classes_class_begin_date}) + " -- " + new java.text.SimpleDateFormat("EEE, d MMM yyyy, hh:mm aa").format($F{classes_class_end_date})

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...