In Jasper Reoprt, crosstab, I have displayed my date as like "2012-09-13". Is there a way to display it in reverse as "13-09-2012" using any String methods? And another thing is that I retrieve the date from SQL dB.
Thanks in advance!
You can do the above in the query level itself instead of doing it on ireport.
You may want to refer to the below link on how to format dates
format date
In ireport, you can use SimpleDateFormat/DateFormat and format your dates as you require
You can refer the link
Related
I am trying in D365 to create a dynamic date format, that is based on the preferences of the user. There is a field "Date, time, and number format" and based on the value of this field, the date format has to be changed. The field on the SSRS report is for some other purposes string, created by some values and one date field, so I would like to ask, if there is any function, that would in a code change the date format based on the user's preferences.
Many thanks for any advice
In APEX I have a date picker with format mask: DD-MON-YYYY HH24:MI
But when I print my report with AOP it looks something like: 2020-04-15T11:02:00.000000Z
How can I change this?
Thank You
Date data is stored in the database in a date format, the APEX format mask is just that - a mask.
I guess this really depends how you're running your report, but I would suggest using to_char() in your SQL that you feed to AOP.
to_char(date_field, 'DD-MON-YYYY HH24:MI') "template_alias"
i have a one field,i want to convert this date filed into date time format as following format in crystal report level.
Please suggest me formula for this
CdateTime({database_string_field})
I would like to display a list of dates in a view, but the problem is that the dates are recorded in SQL format.
I would like to convert this date to my local date format, I'd have to be able to change the field data output format
How can I do this??
Thanks by advance
I found this solution :
I made modification in the "hook_field_formatter_view()" of my date-time field module.
Does anyone of you know a way to format the caption of a chart in Crystal Reports? I have a number that stands for a specific year, this number is 4 digits long. I wnat the caption to be shown like:
2009
But the current way its shown is
2.009
EDIT:
The years are dynamically load from the database and in the DB they are stored as a datetime Field that i select by using the year function...
I don't know anything about crystal reports. You should mention that in the question title, or at least in the question itself, not just in the tags.
I suppose you could use a real DateTime object (instead of an int) for the date and use some function to format dates to display only the year. Like this guy:
For example, I need a date formatting as following:
23-Mar-2007
The following formula will do the trick:
ToText({MYFIELDNAME }, "dd-MMM-yyyy")
That relates to field names, but I suppose you can use the same function (ToText) for the caption of the chart?
You could also store the year in a string.