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: Date conversion in plsql YYYYMM

Re: Date conversion in plsql YYYYMM

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Thu, 25 Mar 2004 07:55:57 +0100
Message-ID: <406282c3$0$11605$636a15ce@news.free.fr>

"liglin" <liglinlillibli_at_hotmail.com> a écrit dans le message de news:db9bdb31.0403242235.f75a976_at_posting.google.com...
> Hello,
>
> I would like to convert a date from YYYYMMDD To YYYYMM01.
>
> Is there a simpler way than:
> TO_DATE(TO_CHAR(TO_DATE(TR.TR_BEG_DATE, 'YYYYMM'),'YYYYMM')|| '01', 'YYYYMMDD');
>
> Thanks,
> Liglin

trunc(TR.TR_BEG_DATE,'MONTH')

Regards
Michel Cadot Received on Thu Mar 25 2004 - 00:55:57 CST

Original text of this message

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