Re: Date-format

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: 1996/06/10
Message-ID: <31bc6f5d.6926481_at_dcsun4.us.oracle.com>#1/1


On Sun, 09 Jun 1996 15:27:16 GMT, reinhold_at_pop-frankfurt.com (Reinhold Broeker) wrote:

>tkyte_at_us.oracle.com (Thomas J. Kyte) wrote:
>
>>On 7 Jun 1996 15:49:43 GMT, yves <an543896_at_anon.penet.fi> wrote:
 

>>>Hello,
>>>
>>>A newcomer with, I hope,a very simple question.
>>>
>>>
>>>I 'am using Oracle RDBMS 7 and forms 4.5.
>>>Dateformats on forms are as followes : 01-MAY-1996
>>>Would like to alter this into 1-6-1996 or 01-06-1996.
>>>Is this possible and how ?
>>>(is there a parametersetting in oracle.ini perhaps ?)
>>>
>>You can do this in a number of ways.
 

>>One way would be to set the date format mask in forms4.5 on the
>>individual items. This would have no impact on the database.
 

>>Another way would be to issue:
 

>>forms_ddl( 'alter session set nls_date_format=''dd-mm-yyyy''' )
 

>>In a when-new-form trigger. This would change the default date mask
>>for your session only. For example:
>
>
>>SQL> alter session set nls_date_format='dd-mm-yyyy';
 

>>Session altered.
 

>>SQL> select sysdate from dual;
 

>>SYSDATE
>>----------
>>08-06-1996
 

>>SQL>
 
>>A third way would be to use the nls_date_format init.ora parameter.
>>This would affect the whole database instance. All dates would be
>>displayed using this new format.
 

>>I would suggest you consider the above to be listed in order of
>>preference. The first option is the 'path of least resistance'. I
>>would tend to avoid the third option. Not many people will change
>>their date format for your application (if you are planning on hosting
>>your application on other databases in the future) since it affects
>>everything in the database.
>
>
>
>>>Many thanks in advance.
>>>
>>>Jan Van den Bosch
 

>>Thomas Kyte
>>Oracle Government
>>tkyte_at_us.oracle.com
>>
>>http://govt.us.oracle.com -- Check out our web site! Brand new, uses Oracle Web Server and Database
>
>
>>-------------------
 

>>statements and opinions are mine and do not necessarily
>>reflect the opinions of Oracle Corporation
>
>
>Will the ALTER SESSION command really change the way Forms
>shows/validates values in date items?
>
>Reinhold Broeker
>reinhold.broeker_at_ubs.com
>

ALTER SESSION does not seem to affect the displaying of a date via forms 4.5.

Another suggestion that was made was to set the NLS_DATE_FORMAT in the oracle.ini file in the windows dir. This again does not seem to affect the date formatting of a date field.

 What you need to do is set the datatype of that field to ALPHA.  Forms will format an ALPHA field based on a date database column according to the NLS_DATE_FORMAT.

The best way is still setting the format mask property on the field itself. Then it will look/act the same on every platform.

Hope this helps.

chris.

--
Christopher Beck
Oracle Government
clbeck_at_us.oracle.com

#include <std_disclaimer.h>
Received on Mon Jun 10 1996 - 00:00:00 CEST

Original text of this message