On Tue, Jun 11, 2002 at 01:10:25PM -0700, [EMAIL PROTECTED] wrote:
> Hello,
> 
>     My Oracle timestamp field returns only the date part when I select and
> fetch it. Is there any way to get the time as well?
> (DBI-1.25; DBD-Oracle-1.12; Oracle 8.1.7)
> 
>    Any suggestions/ideas would be appreciated.

Either set the default date format for the session:

$dbh->do('ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS');

or use TO_CHAR:

$dbh->prepare("SELECT TO_CHAR(SysDate, 'YYYY-MM-DD HH24:MI:SS') FROM Dual");

Ronald

Reply via email to