Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: first of the year
though
SQL> select trunc(sysdate,'YEAR') from dual;
TRUNC(SYSDATE,'YEAR')
might suprise the application designer from time to time.
-- Niall Litchfield Oracle DBA Audit Commission UK -- Niall Litchfield Oracle DBA Audit Commission UK "Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3ffc1db4$0$9387$ed9e5944_at_reading.news.pipex.net...Received on Wed Jan 07 2004 - 09:03:16 CST
> "Scott Mattes" <Scott_at_TheMattesFamily.ws> wrote in message
> news:Xns94696205345F1ScottatTheMattesFami_at_24.48.107.54...
> > Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote in
> > news:9h5nvv85j4u9sbbm598msd47gtofca0un2_at_4ax.com:
> > >
> > >>= trunc(sysdate,'YEAR')
> >
> > But if run on any other day of the year problems could ensue, right?
>
> Wrong
>
> SQL> select sysdate from dual;
>
> SYSDATE
> ---------
> 07-JAN-04
>
> SQL> select trunc(sysdate,'YEAR') from dual;
>
> TRUNC(SYS
> ---------
> 01-JAN-04
>
> SQL>
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> >