(no subject)

From: Charles Jardine <cj10_at_cam.ac.uk>
Date: 1996/02/01
Message-ID: <4eq3g6$lch_at_lyra.csx.cam.ac.uk>#1/1


ral_at_cc.bellcore.com (Ron Levenberg) wrote:
>I am successfully using the Oraperl emulation (Perl5 + DBI + DBD for
>Oracle), but I've just run up against a bit of a problem: I have a
>bunch of data base fields that are of 'date' datatype. When I
>used Oraperl to do a select, they are returned as strings in the
>format '26-JAN-96', which is the default format for Oracle dates.
>I would like to convert this to a different format, mm/dd/yy or
>mm/yy. Is there anything built into Oraperl for doing this, or
>do I need to write a conversion function?
>
>Thanks - Ron Levenberg ral_at_cc.bellcore.com
>

It is much easier to use to_char in the sql to convert to the format you want.

If you wnat the dates as Unix time values, you can do this in the sql as well.
(datecolumn - to_date('1970-01-01', 'YYY-MM-DD')) * (60 * 60 * 24) Received on Thu Feb 01 1996 - 00:00:00 CET

Original text of this message