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

using date input parameter in SQL where clause


viewireport

Recommended Posts

DB - postgres

 

SELECT tt.created_date

FROM

test_table tt

WHERE 

DATE(uc.created_stamp) = DATE($P{ic_date})

 

Here, ic_date is a parameter created using ireport.

parameter (ic_date) class is java.util.Date

 

If default value expression is required, enter like this,

new SimpleDateFormat("yyyy-MM-dd").parse("2008-01-01")

 

Hope this will help many since it took some time for me to figure out the same.

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