2004 IR Help Posted September 2, 2006 Share Posted September 2, 2006 By: timtas - timtassonis How to display the current date in a field? 2004-09-21 01:45 I'd like to display the current date (e.g. 21/09/04) in a field on the output, but found no way to do this, apart from having this value read from a database, or passing it as a parameter to the report. Is there no internal way to do this? By: Gregory A. Swarthout - gswarthout RE: How to display the current date in a fiel 2004-09-21 08:14 new SimpleDateFormat("dd/MM/yy").format(new Date()) By: timtas - timtassonis RE: How to display the current date in a fiel 2004-09-22 01:24 Thanks a lot, but I don't know where to put this in iReport. Do I have to create a field of type java.lang.String and perhaps put new SimpleDateFormat("dd/MM/yy").format(new Date()) in the field description? By: timtas - timtassonis RE: How to display the current date in a fiel 2004-09-22 02:03 Sorry, found out myself now: I have to define a variable and put new SimpleDateFormat("dd/MM/yy").format(new Date()) in the Variable Expression. Works fine now. 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