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: Format Date Problem

Re: Format Date Problem

From: Jennifer <jen_designs_at_hotmail.com>
Date: 22 Apr 2003 05:34:21 -0700
Message-ID: <ac419b20.0304220434.4712c09f@posting.google.com>


Ed Stevens <nospam_at_noway.nohow> wrote in message news:<hfh8avcpc05o3uqgkm7908g1avc5us36b8_at_4ax.com>...
> Just as a follow-on to what Jim said, Oracle's 'date' type *always*
> stores both date and time. And it stores it in whatever internal
> format it stores it in. For all I know -- or care -- that could
> simply be the number of clock ticks since the The Flood. How it is
> presented to the client issueing the SELECT is subject to the
> NLS_DATE_PARM which can be set several different places -- most of
> which the app has no control over. Therefore, I recommend to our
> programmers that they never depend on that parm and always use the
> to_char function. Doing an alter session to set it at the beginning
> of your program serves the same purpose, but I prefer the explicitness
> of using the function.
>
> Conversley, when inserting/updateing a date column, if you don't use
> the to_date function, you have to insure that you are supplying a
> 'date-time' character string in the format defined by the operative
> NLS_DATE_PARM. Again, defensive programming suggests that you always
> use the to_date function so that you have the control you need.
>
> Others will disagree. As an unrepentant COBOL programmer, I always
> did everything I could to keep my code from requiring my telephone to
> ring at 2:00am. I try to take the same approach as a DBA.

I only have the ability to select, as I am a Web Developer using the information in a form ,and not a dba. I cannot alter in any way the data that is stored in the tables, I can only select the columns, then formate them into the style that I need them to be displayed as.

Jennifer Received on Tue Apr 22 2003 - 07:34:21 CDT

Original text of this message

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