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

How i use calendar to add a int to a date


Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...