help For Date Problem In Persian Calendar [message #273618] |
Thu, 11 October 2007 01:50 |
alijeyan
Messages: 184 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 #274127 is a reply to message #274117] |
Sun, 14 October 2007 04:04 |
|
Littlefoot
Messages: 21823 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 querySELECT ma_date
FROM dt_jadval
WHERE ma_code IN (101, 102, 112, 113); ends up with this errorOracle | 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 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 #274453 is a reply to message #274436] |
Tue, 16 October 2007 02:10 |
alijeyan
Messages: 184 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 #275030 is a reply to message #274672] |
Thu, 18 October 2007 02:34 |
alijeyan
Messages: 184 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 .
|
|
|
|
|