I have a dropdown input control where the user selects a number 1 to through 10. Lets call the parameter $P{myNumber}. I've tried having $P{myNumber} as both {{java.lang.String}} and {{java.lang.Integer}}. Inside my query I'd like to use datediff. Normally I would do something like this to get today's date minus 5 datediff(dd,5,convert(varchar,getdate(),101)) Now I'd like to use $P{myNumber}. For example: datediff(dd,$P{myNumber},convert(varchar,getdate(),101)) Has anyone done this kind of thing? I can't get it to work, and as I said, I've with $P{myNumber} as both {{java.lang.String}} and {{java.lang.Integer}}, and also using the ".intValue()"