Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: to_date format

Re: to_date format

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Thu, 21 Sep 2006 21:14:08 +0200
Message-ID: <eeunvc$d28$1@news1.zwoll1.ov.home.nl>


MattJ83 schreef:
> On a closly related matter - i have managed to get the string to be
> converted into a date.
>
> 2006082109 - 21/08/2006 09:00:00
> 2006082110 - 21/08/2006 10:00:00
>
> however, when i read in a string such as:
>
> 2006082100
>
> it is being converted to:
>
> 21/08/2006
>
> the time is being left off completely. I thought as i stipulated
> 'YYYYMMDDHH24' in my code that is would output results from the 24hr
> clock and so would interpret 00 as 00:00:00.
>

If you used to_date, the object returned will be a date, not a string. Date objects are displayed as strings, and get the NLS_DATE_FORMAT applied before being put to the screen.
Try 'alter session set nls_date_form='YYYYMMDDHH24' and see if it shows up okay.

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Thu Sep 21 2006 - 14:14:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US