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: Is it possible to manipulate data that passes thru the App Server

Re: Is it possible to manipulate data that passes thru the App Server

From: <fitzjarrell_at_cox.net>
Date: 2 Nov 2005 13:11:37 -0800
Message-ID: <1130965897.788781.201870@g49g2000cwa.googlegroups.com>

Miggins wrote:
> Hi,
>
> Thanks but i am aware of that. I didnt explain fully what I wanted. We
> have DATETIME fields on Forms which have a format mask of DD-MON-YYYY.
>
> When storing these fields Forms appends 00:00:00 to the end of the
> date. So am wanting to strip these times off as it passes back to the
> DB server. Can this be done in one place, IE the App Server or will we
> have to do it on every DATETIME field on every form.
>
> TIA\
Your mistake in this logic is assuming the database does not store a time component to a date value, which is wrong. Inserting a date, without time, into a table automatically appends 00:00:00 as the time as all dates default to midnight when the time is not also specified:

SQL> alter session set nls_date_format = 'MM-DD-YYYY HH24:MI:SS';

Session altered.

SQL> select to_date('10/02/2005','MM-DD-YYYY') from dual;

TO_DATE('10/02/2005



10-02-2005 00:00:00

SQL> I have no idea why it would be necessary to do what you've asked, as a simple reformatting would cause the time to not be displayed:

SQL> alter session set nls_date_format = 'MM-DD-YYYY';

Session altered.

SQL> select to_date('10/02/2005','MM-DD-YYYY') from dual;

TO_DATE('1



10-02-2005

SQL> Unless you have access to the source code you can't eliminate 00:00:00 time values from your date coiumns, so stop trying.

David Fitzjarrell Received on Wed Nov 02 2005 - 15:11:37 CST

Original text of this message

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