Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to store timestamp in oracle 8.1.7?
Brian Peasland wrote:
> Check out the DATE datatype. It stores data *and* time.
>
> HTH,
> Brian
>
> david chan wrote:
> >
> > Hi,
> > How can I store timestamp thing (not just yyyy-Mon-dd, but include
> > time) to oracle 8.1.7? What kind of datatype it will be? (I know there
> > are no timestamp datatype in 817, but in DB2 and oracle 9i) So how to
> > make up this in 8.1.7?
> > Thanks.
> > David
Comments directed to David Chan:
And it has no choice. There is no way in Oracle to store date without time. The closest you can get is something like TRUNC(SYSDATE) which really just converts the time to midnight 00:00:00.
I think the problem here is that you are doing SELECT statements and don't see the time. Try this on your date field:
SELECT TO_CHAR(date_field, 'DD-MON-YYYY HH:MI:SS')
FROM <table_name>
WHERE rownum = 1;
And you will see the fully formatted date-time stored.
Daniel Morgan Received on Wed Sep 25 2002 - 15:04:44 CDT
![]() |
![]() |