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: timestamp format

Re: timestamp format

From: William Robertson <williamr2019_at_googlemail.com>
Date: 11 Apr 2007 22:46:56 -0700
Message-ID: <1176356816.561679.29910@l77g2000hsb.googlegroups.com>


On Apr 11, 11:17 pm, sybra..._at_hccnet.nl wrote:
> On Wed, 11 Apr 2007 23:09:07 +0200, Andreas Mosmann
>
>
>
> <mosm..._at_expires-30-04-2007.news-group.org> wrote:
> >Mariano schrieb am 11.04.2007 in
> ><1176324768.421002.203..._at_o5g2000hsb.googlegroups.com>:
>
> >> I have a timestamp field in my DB, what is the correct format to
> >> insert the right parameters???
> >It depends on the session parameters, the database parameters ...
> >I prefer to do it like
>
> >insert into MyTable (MyTimeStamp) values
> >(ToDate('DD.MM.YYYY','11.04.2007'));
>
> >But if you need to insert the actual time so you should use sysdate.
>
> >insert into MyTable (MyTimeStamp) values (sysdate);
>
> >Andreas Mosmann
>
> Sorry to say so but timestamps are NOT dates!
> If the OP has a true timestamp column (of datatype timestamp) he needs
> the SYSTIMESTAMP function.
> dates never contain any timezone info!!!
>
> --
> Sybrand Bakker
> Senior Oracle DBA

Also,

SELECT SYSTIMESTAMP

     , TIMESTAMP '1000-01-01 01:23:45'
     , TO_TIMESTAMP('1000-01-01 01:23:45.678','YYYY-MM-DD
HH24:MI:SS.FF3')
FROM dual; Received on Thu Apr 12 2007 - 00:46:56 CDT

Original text of this message

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