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!

Convert Oracle date format masks to Java format masks

kenmadsenSep 6 2011 — edited Sep 6 2011
Have an application based on Oracle that stores data in text form (for display) and in native date format. It is being migrated to another application with a Java based front end that can only use Java format masks to display the dates in the desired display format.

Is there a way to translate the Oracle format masks to Java? I can do this in SQL or PL/SQL using the database or in Java.

I really don't want to write detailed code to parse the masks, although if parsers are available to take an oracle mask into its metadata (minute, year, etc), it may be possible for me to write the code.

This seems like something that must have been done many times over the years. I would prefer to reuse workable code rather than reinventing the wheel.

To be clear, I do not need to alter data or convert dates shown in string form. Just the format masks so the new app will display dates in the same manner as the old app. Fortunately, both apps handle interpreting the format masks in their native technology, so it is just converting the format mask.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2011
Added on Sep 6 2011
4 comments
633 views