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!

Converting a Japanese Imperial date

brynte65May 26 2015 — edited May 27 2015

I need to convert Japanese dates (based on the imperial era) to Gregorian ones. That is, 平成27年5月21日 is May 21th, 2015. Converting the other way round shows that format string "EEYY" gives the year 平成27, as expected However, when I try

TO_DATE('平成27年5月21日', 'EEYY年MM月DD日', 'NLS_CALENDAR=''JAPANESE IMPERIAL''')

I get the error message "not a valid era". But Oracle's own conversion and other sources confirm that it is indeed valid.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2015
Added on May 26 2015
3 comments
791 views