maalto Posted October 17, 2007 Share Posted October 17, 2007 Hi,I seem to have a slight problem with passing a parameter into the report.SQL:OR030100."OR03019" between '1/1/2007' AND $P{end_date} parameters: end_date, java.util.Date, new Date(7,11,31) -reults to empty report.If I use a empty datasource I can print the parameter as: 12/31/07 12:00 AM If I use as parameter new Date(), or choose via prompt I can get correct result. What am I missing here ?Please help. Thanks, Mike Link to comment Share on other sites More sharing options...
svenn Posted October 17, 2007 Share Posted October 17, 2007 Pass the date as a String and convert it in your SQL using to_date. Link to comment Share on other sites More sharing options...
maalto Posted October 23, 2007 Author Share Posted October 23, 2007 Hi thanks for ansver,I did it like this:new SimpleDateFormat("yyyy-MM-dd").format(new Date()) -M$-sql server 2000 seems to like it that way. And when I define last day of this month I did the following:new SimpleDateFormat("yyyy-MM-dd").format(new Date(new Date().getYear(),new Date().getMonth()+1,0)) I don't know if that is the smartest/best way, but it seems to work. BR. Mike 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