Home » Developer & Programmer » Forms » Date Format Mask in Oracle forms 10G (Oracle forms 10 G)
Date Format Mask in Oracle forms 10G [message #506975] Thu, 12 May 2011 02:24 Go to next message
Manesh122
Messages: 2
Registered: May 2011
Location: Bangalore
Junior Member
Hi,

In 10G forms the date format mask in all the items in forms are removed.
As the nls_date_format in database is (dd-mon-rr) the same is expected to come in Oracle 10G forms. Now it is coming as
(DD-MON-YYYY) in 10G forms. I tried looking into the nls_session_date format in runtime in forms it is showing as (dd-mon-rr) but in item it displays as(DD-MON-YYYY). How will i display the date format set in the DB or were is the setting done in Oracle 10G forms.

Re: Date Format Mask in Oracle forms 10G [message #506983 is a reply to message #506975] Thu, 12 May 2011 02:48 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try with a PRE-FORM trigger:
set_application_property(PLSQL_DATE_FORMAT  ,   'DD-MON-RR');
set_application_property(BUILTIN_DATE_FORMAT,   'DD-MON-RR');
forms_ddl('ALTER SESSION SET NLS_DATE_FORMAT = ''DD-MON-RR''');

However, perhaps it would be a better idea to use a format mask that contains both date AND time components (or explicitly format DATE datatype values).
Re: Date Format Mask in Oracle forms 10G [message #507005 is a reply to message #506983] Thu, 12 May 2011 04:16 Go to previous messageGo to next message
Manesh122
Messages: 2
Registered: May 2011
Location: Bangalore
Junior Member
Hi,

I tried the below one in pre-form trigger, It was not working.

But if I try to set this in each form , so whenever the nls_date_format is changed in Database the same need to be changed in forms.

Any Server level setups in 10G forms?
Re: Date Format Mask in Oracle forms 10G [message #620937 is a reply to message #506983] Thu, 07 August 2014 06:59 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
hello
Littlefoot i use this code in my push button to display my sysdate like this 07-Aug-2014

i use this code PRE-FORM trigger:

set_application_property(PLSQL_DATE_FORMAT  ,   'DD-MON-RR');
set_application_property(BUILTIN_DATE_FORMAT,   'DD-MON-RR');
forms_ddl('ALTER SESSION SET NLS_DATE_FORMAT = ''DD-MON-RR''');


its shows my only 07- after that show me squre squre.

so how can i solve this issue my data base level nls_date setting is like this

SQL> SELECT value FROM v$nls_parameters WHERE parameter ='NLS_DATE_FORMAT';

VALUE
----------------------------------------------------------------
DD-MON-RR
Re: Date Format Mask in Oracle forms 10G [message #620960 is a reply to message #620937] Thu, 07 August 2014 08:35 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
x-oracle wrote on Thu, 07 August 2014 07:59

its shows my only 07- after that show me squre squre.


What is squre?
Re: Date Format Mask in Oracle forms 10G [message #621031 is a reply to message #620960] Thu, 07 August 2014 14:30 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wrong! The correct question is "what is squre squre"?

Anyway: why don't you simply use TO_CHAR and desired format mask to display sysdate as you want it or, possibly, set item's format mask?

[Updated on: Thu, 07 August 2014 14:30]

Report message to a moderator

Re: Date Format Mask in Oracle forms 10G [message #621065 is a reply to message #621031] Fri, 08 August 2014 04:35 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
thanks for you reply littlefot

i did this


set_application_property(PLSQL_DATE_FORMAT  ,   'DD-MON-RRRR');
set_application_property(BUILTIN_DATE_FORMAT,   'DD-MON-RRRR');
forms_ddl('ALTER SESSION SET NLS_DATE_FORMAT = ''DD-MON-RRRR''');

message(to_char(sysdate,'dd-mon-rrrr'));


and i compile this form and when i run this

its show me only sysdate 08- and then squere squre and after that i can see 2014 year.. please suggest me
Re: Date Format Mask in Oracle forms 10G [message #621066 is a reply to message #621065] Fri, 08 August 2014 04:41 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
if you do
select to_char(sysdate, 'DD-MON-RRRR') from dual)

in sqlplus what do you get?
Re: Date Format Mask in Oracle forms 10G [message #621067 is a reply to message #621066] Fri, 08 August 2014 05:12 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
thank you cookiemonster
ok i check this on my database site

SQL> select to_char(sysdate, 'DD-MON-RRRR') from dual;

TO_CHAR(SYSDATE,'DD-
--------------------
08-AUG-2014

SQL>


Re: Date Format Mask in Oracle forms 10G [message #621182 is a reply to message #621067] Mon, 11 August 2014 05:47 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
still no any update... Sad Sad
Re: Date Format Mask in Oracle forms 10G [message #621183 is a reply to message #621065] Mon, 11 August 2014 05:54 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
x-oracle

its show me only sysdate 08- and then squere squre and after that i can see 2014 year.


You still didn't explain what those "squere squre" are. Is it a square? If so, it means that Forms displays digits correctly, but it can't display letters.

Is it the case with dates only, or do you see squares wherever you should be seeing letters?

For example, you use Chinese but Forms can't display these characters so it displays squares instead.

If that's so, I'm rather useless here ... I've never worked in multilingual environment and don't know what should be done in order to fix it. Try to search the board for NLS_LANG or NLS_LANGUAGE or NLS in general, or wait until someone (who knows how to deal with that) answers your question.
Re: Date Format Mask in Oracle forms 10G [message #621184 is a reply to message #621183] Mon, 11 August 2014 06:28 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
thanks for your reply Littlefoot

i am uploding you this form screenshot here.its only show me the first two digit of date.its cannot display months . i want output of date like "11-AUG-2014"
  • Attachment: 1.jpg
    (Size: 55.78KB, Downloaded 1264 times)
Re: Date Format Mask in Oracle forms 10G [message #621684 is a reply to message #621184] Sat, 16 August 2014 02:44 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
hello no any reply here..little foot any suggestion
Re: Date Format Mask in Oracle forms 10G [message #621702 is a reply to message #621684] Sat, 16 August 2014 10:45 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sorry, I've already said everything I wanted to. Did you research NLS settings I previously suggested? Search OTN Forms forum, maybe you'll find discussion related to your problem.
Previous Topic: Please, who know, give an info how to create and run parralle program
Next Topic: How to trap forms-java code error
Goto Forum:
  


Current Time: Fri Mar 29 02:39:00 CDT 2024