kuhazwan7 Posted November 21, 2019 Share Posted November 21, 2019 I already change the java class into java.util.Date and change the pattern for that field into the format that i want but nothing happened.. i also set the pattern expression like this "new SimpleDateFormat("dd/MM/yyyy").format($F{yourdatefield})" but still cannot get the answer.. Hope any of you guys can help me :( Link to comment Share on other sites More sharing options...
trvpseudo Posted November 21, 2019 Share Posted November 21, 2019 Hi hi~probably make sure the data field from dataset is java.sql.dateand i think better use 'pattern' than 'pattern expression' in the propertiesso..-click on the text field-in the properties theres 'text field' tab-in the pattern, u can choose the date option there or custom it by combining some format or just type 'dd-MMM-yyyy'the pattern there are quite different from usual, so please take a look at https://community.jaspersoft.com/wiki/date-and-time-patterns to understand it.simply 'd' is for day, 'D' is not -- 'M' is for month, 'm' is not -- etc, look above.wish u did well on ur project! - TV Link to comment Share on other sites More sharing options...
Selva_ms7 Posted November 21, 2019 Share Posted November 21, 2019 pass the $F{yourdatefield} as string and use this (new SimpleDateFormat("d-MMM-yyyy").parse($F{yourdatefield})) 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