Jump to content

default value for Parameter type Date


tejeshwar

Recommended Posts

  • 3 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Tejeshwar,

 

I'm not a Java programmer either, so I keep a few samples handy for things like this. Try these 2 samples of default date values:

 

new java.util.Date() // gives the current date

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

 

Regards,

Matt

Link to comment
Share on other sites

Tejeshwar

 

If you want to do so in the jrxml, try this:

 

 

<parameter name="RequestDate" isForPrompting="false" class="java.util.Date">

<defaultValueExpression ><![CDATA[new java.util.Date(97, 5, 1)]]>

</defaultValueExpression>

</parameter>

 

it represents 06-01-1997

Link to comment
Share on other sites

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