How do I format correctly a time Field in Jasper Reports ?

0

Hello good afternoon I want to ask if someone would be able to help me out with a problem that I have with giving the right format to a field in jasper reports.
What I want to do is to display a number of hours of a field type time, this is what I have made by far:

<textFieldExpression><![CDATA[new java.text.SimpleDateFormat("hh:mm").format($F{TIEMPO_SOPORTE})]]></textFieldExpression>

The result I get with that sentence are pretty much what I want to see, but you see right now my problem is that I get some of information incorrectly because if the time is less than an hour I get 12: preceding the minutes.

Example:

If the field on the database says that the time is 0:15 minutes, the reports says that the information is 12:15.
But the data says that the time is more than an hour it displays it correctly.

So I wonder if someone could help me out with this problem?

csrchvz15's picture
Joined: Mar 5 2020 - 7:54pm
Last seen: 1 day 6 hours ago

0 Answers:

No answers yet
Feedback
randomness