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: trunc

Re: trunc

From: Mark Gumbs <mgumbs--AT--hotmail.com>
Date: Thu, 13 May 1999 09:26:36 +0100
Message-ID: <373a8a8c.0@145.227.194.253>


As said earlier, the reason why you get the 12.05.99 is because you used HH.MM.SS instead of HH.MI.SS. MM is the month.

Mark


Thomas Huewelmeier wrote in message <7hcb36$cnb$1_at_nnrp1.deja.com>...
>Hi,
>
>in my example
>select to_char(trunc(sysdate),'HH:MM:SS') from dual (german language
>setting where date is dd.mm.yy)
>i get 12:05:00
>
>why ? because trunc(sysdate) delivers 12.05.99 and the to_char tries to
>convert 99 into seconds which is not possible
>
>perhaps with your language settings the year is between days and months
>so you will get 12:00:05 or 05:00:12
>
>with your statement you will hardly get '00:00:00'
>
>Hope this helps
>
>T. Huewelmeier
>
>In article <373972BE.CB63D362_at_india.hp.com>,
> "G.H VITTAL" <vittal_at_india.hp.com> wrote:
>> Whenever we do date comparison I remember using trunc
>> command
>> if i say
>>
>> select to_char(trunc(date_field),'HH:MM:SS') from table1
>>
>> I see only second portion is truncated. But i want to truncate the
>> entire time portion i mean i should expect 00:00:00 as the result. How
>> do i do this ?
>>
>> regards
>> vittal
>>
>>
>
>
>--== Sent via Deja.com http://www.deja.com/ ==--
>---Share what you know. Learn what you don't.---
Received on Thu May 13 1999 - 03:26:36 CDT

Original text of this message

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