Various ways to convert Oracle dates ⇔ Perl dates.

Oracle date ⇒ Perl date

Method #1: Method #2: This converts it to an Unix date (epoch date) using only SQL.

(if the actual SQL seems complicated — what it does is convert a date ⇒ interval, and then interval ⇒ number)