How about using to_char on the date column in the select, but still order by
the date column itself? e.g.
$dbh->prepare("SELECT TO_DATE(when, '<FORMAT_STRING>') FROM mytable ORDER BY
when");
Dan
-----Original Message-----
From: Richard Phillips [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 7:24 AM
To: '[EMAIL PROTECTED]'
Subject: FW: Oracle dates
-----Original Message-----
From: Richard Phillips
Sent: Thursday, January 03, 2002 1:23 PM
To: 'Kong, Alan'
Subject: RE: Oracle dates
alan,
i actually was using that, but an annoying little bug showed up. i have an
order
by clause in my query which orders on this time. using to_char causes my
ordering to be done
by the to_char value (string). this means that '31-DEC-2001' came after
01-JAN-2002'.
i decided to use the actual date datatype to correct this.
is there something i'm missing?
-rp
-----Original Message-----
From: Kong, Alan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 1:16 PM
To: 'Richard Phillips'
Subject: RE: Oracle dates
Why don't you use to_char(date, 'HH')??
-----Original Message-----
From: Richard Phillips [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 1:10 PM
To: '[EMAIL PROTECTED]'
Subject: Oracle dates
Hello All,
Does the perl DBI handle oracle dates as simple scalars? I'm running a
query that returns a trunc(date,'hh'). This does return
the full date truncated to the hour. BUT when I call fetchrow_array I get a
string with just the day-mon-year. It seems to be chopping
off my hour. Any thoughts?
-rp