kaz.zurad_1 Posted October 16, 2017 Share Posted October 16, 2017 I do have a problem with presenting date. Format of the field is date (from mysql). Value of that field is '2003-04-17' but on the report it shows me 2/23/42. When I changed it to text file I am not able to filter that field. Link to comment Share on other sites More sharing options...
hozawa Posted October 16, 2017 Share Posted October 16, 2017 Click on the date field and then in the Properties tab, select the "Text Field" tab. Select "Pattern" and enter "yyyy-MM-dd". Link to comment Share on other sites More sharing options...
kaz.zurad_1 Posted October 18, 2017 Author Share Posted October 18, 2017 But it is still text formatted. On reports, when I tried to filter by this field i cannot choose, for example, by the range. Only available filters are as for text file, means "like", "equal", "contain", etc. Not like greated that this date, or less, or, range. Link to comment Share on other sites More sharing options...
djohns2 Posted October 18, 2017 Share Posted October 18, 2017 Have you tried 'new SimpleDateFormat'. I have found that invaluable for date formatting. You don't need to convert the date - which I assume you only did to try to get it to work another way.new SimpleDateFormat("yyyy-MM-dd").format($F{some_dt}) [/code] Works for $P, $V values etc. as well...at least for me. I am using Sybase ASE dates but I presume it should work for most? It is a JAVA function. Link to comment Share on other sites More sharing options...
madhanharish Posted October 21, 2017 Share Posted October 21, 2017 Right click the Text field that you want to display date field then select field pattern From there you can see the types of date fields available and pick the one that you needed 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