donbowden Posted May 13, 2009 Share Posted May 13, 2009 I am trying to create a month variable from a date field. I then want to use the month variable to group by month. I have created a variable called "month" and assigned the formula:$F{TRAFFICDATE1}.getMonth()But this returns an error of "cannot cast from int to string".Please advise if this approach will work for grouping a report based on what month a paricular date field is associated. Thanks. Link to comment Share on other sites More sharing options...
andfedotov Posted May 13, 2009 Share Posted May 13, 2009 getMonth() returns int what you need as a result of your expression is String. So, Integer.toString($F{TRAFFICDATE1}.getMonth()) should work for you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now