Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: to_date format
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
![]() |
![]() |