How to change the date format as DD-MON-YYYY, when you are passing as parameter and printing in the output in XML PUBLISHER or BI PUBLISHER.
Requirement:- I want the date format to be printed as DD-MON-YYYY in the output. But the date is a parameter and there is no database column for this one.
In the output the date was printing like this:
2015-01-01T00:00:00.000+05:30
I want this to be printed as 01-JAN-2015
When I use <?xdofx:to_char(trunc(P_FROM_DATE),'DD-MON-YYYY')?>
it was coming as 31-Dec-2014
that means - 1 date.
Solution:- The solution for this is:
<?format-date:P_FROM_DATE;'dd-MMM-yyyy';'Asia/Calcutta'?>
By using the above xml tag, I am able to print the date as 01-Jan-2015.
I got the solution in this way, I am happy if it helps to anyone by seeing my post.