Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はOracle11gSQLDeveloperを使用しています
日付が0523(mmDD)のvarchar2列があります。
それらを日付列に変換して、23-05(dd-mm)のように見せたいです。
何か案は?
さて、あなたはあなたが望むフォーマットを得るために直接文字列操作をすることができます:
substring(c, 3, 2)||'-'||substring(c, 1, 2)
日付に変換するには、次を使用できます。
to_date('2012'||c, 'YYYYMMDD')
日付を希望の形式に戻すには:
to_char(<date>, 'DD-MM')