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: Brian Peasland <dba_at_nospam.peasland.net>
Date: Thu, 21 Sep 2006 13:01:32 GMT
Message-ID: <J5y1Ix.EKA@igsrsparc2.er.usgs.gov>


MattJ83 wrote:
> 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.
>

Have you considered concatenating '00' to the end of your string and then using the format mask 'YYYYMMDDHH24MI'? I haven't tested it, but I'm not sure that Oracle truncates the minutes.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Thu Sep 21 2006 - 08:01:32 CDT

Original text of this message

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