H27790 Posted July 1, 2020 Share Posted July 1, 2020 I have strings, startDate, endDate, showStartDate, and showEndDate. Any text field I use them in will dislay 01/01/2020 12:00AM as 1/1/2020 12:00AM. I just want 01/01/2020. Nothing I have done, including use of 'Pattern' in the field settings, has changed the format. What else can I try? Link to comment Share on other sites More sharing options...
luked Posted July 1, 2020 Share Posted July 1, 2020 Hi there,If you are using an SQL query to pull your data you will need to adjust the format in the query. Using the pattern in the field will not change the SQL format. Link to comment Share on other sites More sharing options...
jgust Posted July 2, 2020 Share Posted July 2, 2020 If the field was a date datatype then you can use the pattern "M/dd/yyyy".Since the incoming field is a fixed-length string you can grab the first 10 characters:MID("01/01/2020 12:00AM",1,10)[/code]@luked suggestion gives you the most flexibility. Converting the field to the proper datatype in SQL then you can use pattern and later if you need to do date calculations you can do that with no effort. Link to comment Share on other sites More sharing options...
H27790 Posted July 6, 2020 Author Share Posted July 6, 2020 How do I accomplish this in Jaspersoft Studio? 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