Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: changing & questions on NLS_DATE_FORMAT on nt

Re: changing & questions on NLS_DATE_FORMAT on nt

From: shawn <gs21smw_at_bellsouth.net.nospam>
Date: Thu, 06 May 1999 04:06:50 GMT
Message-ID: <37321221.47386078@news.atl.bellsouth.net>


On Thu, 06 May 1999 04:03:03 GMT, Andrew May <amay_at_home.com> wrote:

>What you are talking about is the external presentation of an oracle
>date field. Internally, the date is stored in the same format no matter
>what you set the nls setting to.
>
>You should use TO_CHAR(date,'format') whenever selecting a date.
>
>Andrew.

Oh ok I see....thanks! this has me confused & I'm not an oracle guru =) just trying to learn...

So lets say I have 2 tables 1 has to have the date in a field. so I create the table date field using datatype date for that field

to place the date into the table field I use the sysdate function sans formating, even though the table shows 04-MAY-99 it can actually be pulled out in any format by using the TO_CHAR function as above. Correct?

So what if I have a table field where I need to record the time? do I use a data type of char? & then use the TO_CHAR(sysdate,'HH24:MM:SS) when inputing the time?

I guess I got confused when I was reading about the nls_date_format & sysdate & read that it can store the time also so I was going to just wrap it all up in the date field using the date datatype.....but this will work =)

thanks,
Shawn Received on Wed May 05 1999 - 23:06:50 CDT

Original text of this message

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