Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Auto capitalize M(m)onths and D(d)ays

InoLJul 22 2022

I'm working on a multi language application (Oracle 19c) and need to properly use upper and lower case in date formats. I've not found a solution to have Oracle automatically capitalize month and days. For example, this is correct:

select to_char(sysdate, 'fmday dd month yyyy', 'NLS_DATE_LANGUAGE = DUTCH') today  
from   dual

vrijdag 22 juli 2022

But this is not:

select to_char(sysdate, 'fmday dd month yyyy', 'NLS_DATE_LANGUAGE = ENGLISH') today  
from   dual

friday 22 july 2022

I should use this for English

select to_char(sysdate, 'fmDay dd Month yyyy', 'NLS_DATE_LANGUAGE = ENGLISH') today  
from  dual

Friday 22 July 2022

I fiddled around with DL, but that only seems to make it worse (the session NLS_TERRITORY = AMERICA):

select to_char(sysdate, 'DL', 'NLS_DATE_LANGUAGE = DUTCH') today  
from dual
Vrijdag, Juli 22, 2022

For this to work there should also be a NLS_DATE_TERRITORY I guess,

Other than writing my own function, is there a date format that auto capitalizes months and days?

Thanks,
Ino

This post has been answered by BluShadow on Jul 22 2022
Jump to Answer
Comments
Post Details
Added on Jul 22 2022
11 comments
166 views