How i use calendar to add a int to a date


I have a field of type date, and i wanna add a variable of type int, in the months. i was lokking in the forum and they recommend that i use the instance of calendar, but i dont know how do that. 

i was using this expression. $P{cal}.add( Calendar.MONTH,$F{timeframe})

and appear a error, 

cvc-enumeration-valid: Value 'java.util.Calendar' is not facet-valid with respect to enumeration '[java.lang.Boolean, java.lang.Byte, java.util.Date, java.sql.Timestamp, java.sql.Time, java.lang.Double, java.lang.Float, java.lang.Integer, java.lang.Long, java.lang.Short, java.math.BigDecimal, java.lang.Number, java.lang.String]'. It must be a value from the enumeration.

marcelobeplerjunior_1's picture
Joined: Jan 6 2015 - 6:28am
Last seen: 5 years 8 months ago

0 Answers:

No answers yet