9 Replies Latest reply: Apr 19, 2012 11:32 PM by 889214 RSS

    Format Date Parameter

    660777
      Hello all,

      I'm trying to format the date parameter of a report in my RTF and I've failed with every attempt. I'm hoping someone has a solution readily available.

      The parameter name is param_start_date. Every format I've tried output the parameter value as: 2011-01-18 00:00:00.0 I need the date to be displayed as DD-MON-YYYY (i.e., 18-APR-2011 or 18-Apr-2011).

      Here's what I've tried:
      <?param_start_date?>
      <?xdofx:to_date(param_start_date, 'YYYY/MM/DD HH24:MI:SS.FF1')?>
      <?xdofx:to_date(param_start_date, 'DD-MON-YYYY')?>
      <?xdofx:to_char(param_start_date, 'DD-MON-YYYY')?>
      <?xdofx:to_char(xdofx:to_date(param_start_date, 'YYYY/MM/DD HH24:MI:SS.FF1'), 'DD-MON-YYYY')?>
      <?xdoxslt:ora_format_date(param_start_date,'DD-MON-YYYY')?>

      I can't change the source query, so it has to be done in the RTF template.

      Any suggestions are welcome.