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: Oracle date time

Re: Oracle date time

From: Kai Sodemann <Kai.Sodemann_at_memo.ikea.com>
Date: 12 Oct 1999 08:04:30 GMT
Message-ID: <01bf1491$36689420$6e49100a@pc910-sode.seurope.ikea.com>


Hi,

you declared your dLastModifiedOn as date variable and dates do always store the time part too. So just remove the to_char and everything is fine. The time will be copied to your variable too.

reg Kai

saschac_at_my-deja.com wrote in article <7tt6cf$4v6$1_at_nnrp1.deja.com>...
> Hello all, I am trying to get out the time part of a date field. I know
> I can do such a thing like [select to_char(lastmodifiedon,'dd-mon-yy
> hh24:mi:ss') from tblobject where id=7957] and that works but I need to
> be able to do this in a stored procedure.
>
> here is a fragment of my pl/sql procedure
>
> It works fine if i remove the to_char part but i need the time
>
> dLastModifiedOn out date
> vtblObject tblObject%ROWTYPE;
> select * into vtblObject from tblObject where id=idxx;
> dLastModifiedOn:=to_char(vtblObject.LastModifiedOn,'dd-mmm-yyyy hh24:mi:
>
> Any suggestions please. I would like the dLastModifiedOn to stay as a
> date.
>
> Many thanks to you all
>
> Sascha Curzon
> Victoria & Albert Museum
> London
> England
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Received on Tue Oct 12 1999 - 03:04:30 CDT

Original text of this message

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