Home » Developer & Programmer » Forms » help For Date Problem In Persian Calendar
help For Date Problem In Persian Calendar [message #273618] Thu, 11 October 2007 01:50 Go to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Hi All

I use NLS_CALENDAR='PERSIAN' and NLS_DATE_FORMAT='YYYY/MM/DD'
and NLS_LANG='AR8MSWIN1256 .
i have a form (with FORM 6i) with a Date feild.

when user enter date '1386/01/01' (in Persian Format this day is the first day Of Persian Year ) and equal 21 march 2007 .
in my form ######### apeared .
Please Help Me.

ALI JEYAN


Re: help For Date Problem In Persian Calendar [message #273621 is a reply to message #273618] Thu, 11 October 2007 02:05 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Try making your item wider. Remember you need to change TWO properties.

David
Re: help For Date Problem In Persian Calendar [message #273630 is a reply to message #273621] Thu, 11 October 2007 02:17 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Two Property ? I don't Understand !!!

It Is very Important for Me and My APPlication .

ThanQ
Ali

Re: help For Date Problem In Persian Calendar [message #273638 is a reply to message #273630] Thu, 11 October 2007 02:58 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
The 'width' and the 'length'.

David
Re: help For Date Problem In Persian Calendar [message #273639 is a reply to message #273638] Thu, 11 October 2007 03:03 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
The 'Width' And 'Heigth' are good .

Only Date '1386/01/01' is problem , other dates display in Item .
this date is the first day of 'PERSIAN CALENDAR' and only this date is display '##########'
Re: help For Date Problem In Persian Calendar [message #273640 is a reply to message #273639] Thu, 11 October 2007 03:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
They are NOT good. Make them bigger.

David
Re: help For Date Problem In Persian Calendar [message #273646 is a reply to message #273640] Thu, 11 October 2007 03:19 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Excuse Me David .

Width And Heigth is Very Good .

I send My Form . Please See ......
  • Attachment: DD1.JPG
    (Size: 91.36KB, Downloaded 176 times)
Re: help For Date Problem In Persian Calendar [message #273659 is a reply to message #273646] Thu, 11 October 2007 04:17 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How do you know it is '1386/01/01'?

Please, copy and paste SQL*Plus session which returns the same data - something like
SELECT ma_date
FROM this_table
WHERE ma_code IN (101, 102, 112, 113);
Re: help For Date Problem In Persian Calendar [message #273665 is a reply to message #273659] Thu, 11 October 2007 04:43 Go to previous messageGo to next message
ZZTOP2005
Messages: 31
Registered: August 2007
Member
Hi Mr Jeyan
you never change NLS_CALENDAR.
I Have similer Problem With You Then I Solve it this way:
i write Procedure for convert english date to Persian Character Date and save it to a Varchar2(10) Field.
Good Luck Cool

[Updated on: Thu, 11 October 2007 06:22]

Report message to a moderator

Re: help For Date Problem In Persian Calendar [message #273861 is a reply to message #273665] Fri, 12 October 2007 01:06 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Read my post. I said 'length' not 'height'.

David
Re: help For Date Problem In Persian Calendar [message #273888 is a reply to message #273861] Fri, 12 October 2007 02:02 Go to previous messageGo to next message
sasipalarivattom
Messages: 118
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member

I think Mr. David is talking about the size of the particular item.
Please try with the "maximum length" property of the item.

Regards
Sasi...
Re: help For Date Problem In Persian Calendar [message #274115 is a reply to message #273861] Sat, 13 October 2007 23:34 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
ThanQ and Excuse Me David !




Re: help For Date Problem In Persian Calendar [message #274117 is a reply to message #273659] Sat, 13 October 2007 23:44 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Hi LittleFoot

Please See the result of your SQL .
  • Attachment: ssqqll.JPG
    (Size: 68.47KB, Downloaded 152 times)
Re: help For Date Problem In Persian Calendar [message #274127 is a reply to message #274117] Sun, 14 October 2007 04:04 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, I understand why your last query might have failed - I'd use TO_DATE function (... WHERE ma_date <> TO_DATE('1386/01/01', 'YYYY/MM/DD')) . But the first two - huh?!?

As this query
SELECT ma_date
FROM dt_jadval
WHERE ma_code IN (101, 102, 112, 113);
ends up with this error
Oracle

ORA-01839 date not valid for month specified

Cause: The day of the month specified in the date is invalid for the given month. The day of the month (DD) must be between 1 and the number of days in the month.

Action: Enter a valid day of the month for the specified month.
I'd say that 'dt_jadval.ma_code' is a DATE column. Is it? Could you post the result of
DESC dt_jadval;
Or, even better, 'CREATE TABLE dt_jadval' along with seveal 'INSERT INTO dt_jadval' statements, so that we could create or own testing environment?
Re: help For Date Problem In Persian Calendar [message #274413 is a reply to message #274127] Tue, 16 October 2007 00:31 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
I sent SQL statments from CREATE TABLE and INSERT .

Please see attach .

ALI
  • Attachment: TT1.JPG
    (Size: 61.13KB, Downloaded 145 times)
Re: help For Date Problem In Persian Calendar [message #274436 is a reply to message #274413] Tue, 16 October 2007 01:24 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do it as text so that we can copy and paste it.

David
Re: help For Date Problem In Persian Calendar [message #274453 is a reply to message #274436] Tue, 16 October 2007 02:10 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member

I create table with the folowing :

  CREATE TABLE DT_JADVAL  (
         MA_CODE   NUMBER(3),
         MA_TITLE  VARCHAR2(50),
         MA_YEAR   NUMBER(4),
         MA_DATE   DATE ,
         CONSTRAINT PK_JADVAL PRIMARY KEY (MA_CODE) );



then insert record with :

     INSERT INTO DT_JADVAL VALUES 
     (101,'TITLE 101 ' , 2007 ,'1386/01/05');
   
    INSERT INTO DT_JADVAL VALUES 
     (102,'TITLE 102 ' , 2007 ,'1386/01/01');

    INSERT INTO DT_JADVAL VALUES 
       (103,'TITLE 103 ' , 2007 ,'1386/01/03');

    INSERT INTO DT_JADVAL VALUES 
     (104,'TITLE 104 ' , 2007 ,'1386/01/30') ;

   


I CREATE DATA BLOCK in Forms 6i .

ONLY ONLY in the second row MA_DATE ='###########'
because in this row ma_date='1386/01/01' and the other row is
good.

I use NLS_LANG='AMERICAN_AMERICA.ARMS1256'
NLS_CALENDAR = 'PERSIAN'
NLS_DATE_FORMAT='YYYY/MM/DD'
my server is WIN2000 ADVANCED SERVER with ORACLE 9 i
My client is winXP with developer 6i
Re: help For Date Problem In Persian Calendar [message #274672 is a reply to message #274453] Tue, 16 October 2007 14:57 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's the result of my test case, ran on Oracle 10g R2:
SQL> select ma_code, ma_date from dt_jadval;

   MA_CODE MA_DATE
---------- ----------
       101 1386/01/05
       102 1386/01/01
       103 1386/01/03
       104 1386/01/30

And here's a simple default form, created with Forms Builder 10g (I don't have 6i here to test it):

./fa/3246/0/

Everything seems to be fine in Croatia. No idea what might be wrong in Persia ... I'll try to repeat those actions tomorrow using Developer Suite 6i and let you know what happened.
Re: help For Date Problem In Persian Calendar [message #275030 is a reply to message #274672] Thu, 18 October 2007 02:34 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Thanks LittleFoot ...
Please answere these questions :
1 - Are you test MA_DATE As DATE culomn ?
2 - in Form biulder what the FORMAT MASK for MA_DATE ?
3- what NLS_LANG and NLS_CALENDAr and NLS_DATE_FORMAT you use ?

thank you verrrrrrrrryyyyyyyyyyyyyyyyy muuuuuuuuuuuuuuuuch .


Re: help For Date Problem In Persian Calendar [message #275080 is a reply to message #275030] Thu, 18 October 2007 04:15 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I've created a table using the information you provided. As you've said MA_DATE is a DATE, that's what I did as well.

Form was created using a Data Block Wizard. I didn't modify any property, including format mask.

NLS_LANG = CROATIAN_CROATIA.EE8MSWIN1250
NLS_CALENDAR = GREGORIAN
NLS_DATE_FORMAT = DD.MM.RR
Re: help For Date Problem In Persian Calendar [message #275434 is a reply to message #275080] Sat, 20 October 2007 01:00 Go to previous message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Can you test with the folowing ?

NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256
NLS_CALENDAR=PERSIAN
NLS_DATE_FORMAT='YYYY/MM/DD'

ALI
Previous Topic: can run form runtime at unix
Next Topic: Forms 10g & Froms 6i
Goto Forum:
  


Current Time: Wed Dec 07 16:46:43 CST 2016

Total time taken to generate the page: 0.11233 seconds