Re: Problem with date

From: <sybrandb_at_yahoo.com>
Date: 2 Jan 2004 06:22:21 -0800
Message-ID: <a1d154f4.0401020622.7cbf9f63_at_posting.google.com>


ofer_c33_at_hotmail.com wrote in message news:<5604e7df.0401020304.adf750f_at_posting.google.com>...
> when i put record into table in this format
> insert into test(boat_id,strartDate) values(2,to_date('2004-01-02
> 16:00:00','YYYY-MM-DD HH24:MI:SS'));
>
> it is lood ok
> but when i try to fet the record out
> i see only the date and not the hour
>
> how can i see the hour???/////
>
> thanks Ofer

either by using the to_char function in your select statement (recommended) or by issuing alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS' (not recommended, as now every other system running your code should run the same alter session command)

Hth

Sybrand Bakker
Senior Oracle DBA Received on Fri Jan 02 2004 - 15:22:21 CET

Original text of this message