where does SimpleDateFormat belong

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.

Mary.Tyckoson's picture
Joined: Feb 6 2015 - 2:17pm
Last seen: 2 years 4 months ago

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 - 7 years 1 month ago

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.

Mary.Tyckoson - 7 years 1 month ago

1 Answer:

Hey Mary,

Let me see if i understand,  try change the type of your field to:  java.sql.Date

rob.naban's picture
Joined: Oct 8 2014 - 1:28pm
Last seen: 2 years 1 month ago
Feedback