can anyone give me a tip how to get decimals when divide two numbers?
output is Double
I get the output 0.0
How do i get 0.1???
output_row.price =1.0/10
can anyone give me a tip how to get decimals when divide two numbers? output is Double I get the output 0.0 How do i get 0.1??? output_row.price =1.0/10
Is this the real expression? You should not have an issue if your output row is defined as double.
You could try 1.0d/10d
But this expression looks okay to me
Your result suggests that you're getting and integer division that is then converted to a double
Thanks!
A mixture between both worked:
new java.math.BigDecimal((double)(TalendDate.diffDate(rowHoved.TrombolyseStarttid,rowHoved.Innleggelsestidspunkt,"ss"))/3600d)