jo_bonanno Posted October 11, 2006 Share Posted October 11, 2006 I have a date field $F{postdate} in String "yyyymmdd". Is there any way when I have read from my db instead of showing straight "yyyymmdd" it display as "mm/dd/yyyy". Link to comment Share on other sites More sharing options...
kevintaute Posted October 12, 2006 Share Posted October 12, 2006 I have a couple of questions - Is $F{postdate} stored in the database as a date value or as a string? If it is stored as a date, you can use the text field screen the pattern box to format as mm/dd/yyyy. Most of the formats that are brought up with the create button are dd/MM/yyyy - after selecting the format, I change it to MM/dd/yyyy without any issues :) If it is stored as a string you can either use a Java expression to convert to date then display or use Java substring parsing to do the same. Link to comment Share on other sites More sharing options...
tlavalle Posted October 25, 2006 Share Posted October 25, 2006 That doesn't work. I made a variable and converted my field to string, then proceeded to set the pattern on the properties window and the column looks like this MM/dd/yy 2006/01/01 the variable I have in the expression $f{<fieldname>}.toString() 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