Change the language of the date in Jasper Reports

0

I have an Oracle XE database, from which I extract information for a report, which in development mode shows the date in Spanish, however when I run it from my application in Oracle Apex puts the date in English .

Any suggestions on how to change the date?

Thanks and regards

    
asked by Barry Gon 17.07.2017 в 23:39
source

2 answers

1

With the instruction Locale you specify the language you want to use in this case Spanish "es" English for example would be "us" .

(new java.text.SimpleDateFormat("EEEEE dd MMMMM yyyy hh:mm aaa",new Locale("es", "ES"))).format(new Date())
    
answered by 17.07.2017 в 23:54
0

The NLS_LANGUAGE solution

SELECT ENAME FROM EMP
WHERE HIREDATE > TO_DATE('1-JAN-01','DD-MON-YY',
'NLS_DATE_LANGUAGE = AMERICAN')

e.g. NLS_LANGUAGE="MEXICAN SPANISH" for Mexico

Or if you have access as SYS

Run ALTER SESSION SET NLS_LANGUAGE="MEXICAN SPANISH";
    
answered by 21.07.2017 в 21:36