hervefranck1 Posted July 21, 2021 Share Posted July 21, 2021 I have this expression to display a date : ($F{debut}== null ? " " : DATEFORMAT($F{debut},"dd/MM/yyyy HH:MM"))The problem is when the value of the date is null , there is an error message:"Java.lang.string cannot be cast to java.util.date" Even if i fill a message in my first condition, the same error appears. Link to comment Share on other sites More sharing options...
rmeadows Posted August 25, 2021 Share Posted August 25, 2021 Check the return type of the variable/parameter you are defining the expression on...you may be returning a string here but the variable or parameter type is Date. The return type needs to match the variable/parameter type to cast correctly. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now