Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How do I change de date formats for a non-ISO field in a RTF template?

Received Response
21
Views
4
Comments

Hi,

I'm kind of new in Oracle-land, and the many fora and places to ask questions are still sometimes confusing, so first of all I hope I'm in the right place at the moment.

The issue at hand is: I live in 'nl-NL' and I'm building a template for a confirmationletter for Opera Cloud. In this letter I have several date fields that I want to display in the way we are localy used to.

So for example I have the
<?xdoxslt:format_date(SYSTEM_DATE_ISO,’dd MMMM yyyy’, 'nl-NL', 'nl-NL')?>
in the header, and the same formula, but with ARRIVAL_DATE_ISO and DEPARTURE_DATE_ISO in the body of the text.

But I also want to display the DEPOSIT_DUE_DATE in that format. So I made <?xdoxslt:format_date(DEPOSIT_DUE_DATE,’dd MMMM yyyy’, 'nl-NL', 'nl-NL')?>. Yet that doesn't work; I get:

11 november 2024 for my system date (date of sending the confirmationletter)
17 januari 2025 for my arrival date
19 januari 2025 for my departure date

which is alle correct dutch and are all derived from ISO dates

but

25 januari 0003 for my deposit due date.

which should be 03 januari 2025 and therfore is not correct. It seems to have switched the year and day value, and where the DEPOSIT_DUE_DATE field is not an ISO date.

My best guess is that therein lies the problem.

But.

How do I solve that? Is this solvable?

I hope someone can actually help me on my merry way!

Kind Regards,

Martijn

Answers

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    Hi Martin,

    Can you share how the dates look in backend? Can you share an example of ARRIVAL_DATE_ISO and DEPOSIT_DUE_DATE from backend?

    Thanks.

  • Martijn Maring
    Martijn Maring Rank 1 - Community Starter

    Hi Mandeep,

    sure:

    2025-01-17 for ARRIVAL_DATE_ISO

    03-01-25 for DEPOSIT_DUE_DATE

  • RichardChan
    RichardChan Rank 6 - Analytics Lead

    do you have the option when generating the file to make the date into the YYYY-MM-DD format rather than attempting to patch code for each date format?

  • Martijn Maring
    Martijn Maring Rank 1 - Community Starter

    I'm afraid not; I get a fixed set of data that is determed by the Oracle software engineers at Opera Cloud.