Mary.Tyckoson Posted April 3, 2015 Posted April 3, 2015 I'm trying to have a date field (lastStatusDate) coming from a sybase query come into the report recognized as a date field - both for filtering and eventual input control. I'm converting the internal Sybase date to MM/dd/yyyy format, but it only seems to like it as java.lang.string. It looks like I need to use SimpleDateFormat, but where do I actually put the (new SimpleDateFormat("MM/dd/yyyy").format($F{lastStatusDate})). Using JasperStudio 6.0.3. Or do I have this turned around. Know my way around SQL, but java is new territory.
rob.naban Posted April 16, 2015 Posted April 16, 2015 Hey Mary,Let me see if i understand, try change the type of your field to: java.sql.Date
Mary.Tyckoson Posted April 17, 2015 Author Posted April 17, 2015 I'm using java.sql.date, and while that makes it recognized the data as being a date, it adds a time as well, which is always 12:00. I want to format it to just MM/dd/yyyy
Mary.Tyckoson Posted April 17, 2015 Author Posted April 17, 2015 I was making this too hard. Figured out that all I had to do was go to Text Field and set the pattern, since I could live with comverting to M/d/yy.
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