Home » Developer & Programmer » Forms » what is the best solution for persian calendar ? (10.1.2.0.2 , xp)
what is the best solution for persian calendar ? [message #300647] Sun, 17 February 2008 06:20 Go to next message
azadehfar
Messages: 10
Registered: April 2006
Location: iran
Junior Member
Hi

i have a problem same topic #170483

now i writed a convertor for persian to geregorean and reverse date.

i keep all nls_.. to defult (geregorian)
NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256
NLS_DATE_FORMAT=RRRR/MM/DD
NLS_CALENDAR=GREGORIAN
NLS_DATE_LANGUAGE= AMERICAN


when i run my form my date field (type is date) show me (2008/02/10)
i want a api or a solution where convert to persian same (1386/11/20) in my date field .but in backend still (2008/02/10)
just viewer change .

i have convertor program but i donot know how can i must doing this work .
i think we must change java codes in frmall_jinit.jar
please help me .

Tanks
Adel
Re: what is the best solution for persian calendar ? [message #300679 is a reply to message #300647] Sun, 17 February 2008 14:50 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you already know how to convert dates, why wouldn't you do that in the POST-QUERY trigger? As the original value must stay as it is, create additional display item which will display Persian date.
Re: what is the best solution for persian calendar ? [message #302264 is a reply to message #300679] Mon, 25 February 2008 01:40 Go to previous messageGo to next message
azadehfar
Messages: 10
Registered: April 2006
Location: iran
Junior Member
no i can not use of POST_QUERY becuse
when i insert persian calandare (example 1386/02/31)
in date field and save for some of dates give me error same topic #170483
for this error soulution is in when-validation-item i change to gregorian (example 2007/09/14) date where end-user see gregorian date where this is not good becouse end-user must alwayse see persian date .
anothers soulution is in PRE-INSERT form i change all of persian date to gregorian and after save in POST-INSERT i change all of gregorian date to persian becouse end-user see persian date
this task is hard becouse i must check all date field in all blocks and change
i wait better soulution where just viewer change to persian but inside field still gregorian where when i save dates dont give me eny error .
e businnes suite doing same this solution i think they use of running java files (same frmall_jinit.jar) but i dont know what exactly thay doing .

Please Help me .
Regards
Adel
Re: what is the best solution for persian calendar ? [message #302498 is a reply to message #302264] Mon, 25 February 2008 23:38 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Consider storing all dates as Gregorian but NOT displaying them. In the post-query populate a matching set of non-database Persian date fields with the Persian date. Then, in the When-Validate-Item trigger on the non-database Persian date field set the matching database Gregorian date field with the suitably modified date.

David
Previous Topic: How to send a mail through oracle form
Next Topic: how to search form level packages
Goto Forum:
  


Current Time: Sun Feb 09 04:32:57 CST 2025