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.