eeshachhabra Posted February 5, 2018 Share Posted February 5, 2018 I am using Jaspersoft Studio 6.4.3 to create report. I want to show time in EST format as Wed, Nov 15, 2017 12:12 AM EST. Below is what I have given as expression in the text fieldnew SimpleDateFormat("E, MMM dd, YYYY HH:mm a z").format(new java.util.Date()) and am getting the output as Wed, Nov 15, 2017 12:12 AM GMT+05:30.Pleae help to get the output in desired format i.e. Wed, Nov 15, 2017 12:12 AM EST.Thanks in advance. Link to comment Share on other sites More sharing options...
sergey.vishnevetskiy Posted February 5, 2018 Share Posted February 5, 2018 Use Text Field. Expression = new java.util.Date(). And then in Patter enter desired format. Link to comment Share on other sites More sharing options...
eeshachhabra Posted February 6, 2018 Author Share Posted February 6, 2018 Thanks for your response.I tried text field expression new java.util.Date(). But still am getting Tue, Feb 06, 2018, 12:48 PM GMT+05:30. I want the date to be in format in EST i.e. like tis Tue, Feb 06, 2018, 12:48 PM EST.I am using this format in pattern field E, MMM dd, YYYY HH:mm a z. How to convert this time to EST time? Link to comment Share on other sites More sharing options...
sergey.vishnevetskiy Posted February 6, 2018 Share Posted February 6, 2018 Here explained how to do it using java. But it'll involve creating custom class and using it as scriptlet in report. Link to comment Share on other sites More sharing options...
eeshachhabra Posted February 8, 2018 Author Share Posted February 8, 2018 Thanks a lot. I am able to achieve it by doing formatting in java and passing it as a parameter to jrxml file. 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