Difference between revisions of "Hijri Date Adjustment in Oracle"

From SmartHCM Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
Since Hijri calendar is based on the moon complete revolution around the sun, Hijri calendar has different number of days in a year than Gregorian. Therefore some manual
 +
deviation adjustment might be needed for the conversion to/from Gregorian. In other words Hijri calendar is Lunar based, corrections need to be made every so often.
 +
 
Perform the following steps to adjust the Hijri date:
 
Perform the following steps to adjust the Hijri date:
  
*1. Copy the attached file "lxecal.nlt" into Oracle_home\nls
+
*1. Copy the "[https://drive.google.com/open?id=1mug-_sC-mgaSPYmGsSgsA-4J8pboaeMr lxecal.nlt]" file into Oracle_home\nls (you can adjust the file as per your need)
 
*2. Shutdown the database (SQL>shutdown immediate)
 
*2. Shutdown the database (SQL>shutdown immediate)
 
*3. execute the lxgen.exe command from "Oracle_home\bin"
 
*3. execute the lxgen.exe command from "Oracle_home\bin"
 
*4. Start the database
 
*4. Start the database
 +
 +
Notes: * Gregorian date specified in the deviation should correspond to one of 29th, 30th or 31th days of the Hijri calendar.
 +
* Numbers greater than 10 are used to subtract days, e.g: 11 --> subtract one day, 12 --> subtract two days and etc.

Latest revision as of 17:56, 28 August 2018

Since Hijri calendar is based on the moon complete revolution around the sun, Hijri calendar has different number of days in a year than Gregorian. Therefore some manual deviation adjustment might be needed for the conversion to/from Gregorian. In other words Hijri calendar is Lunar based, corrections need to be made every so often.

Perform the following steps to adjust the Hijri date:

  • 1. Copy the "lxecal.nlt" file into Oracle_home\nls (you can adjust the file as per your need)
  • 2. Shutdown the database (SQL>shutdown immediate)
  • 3. execute the lxgen.exe command from "Oracle_home\bin"
  • 4. Start the database

Notes: * Gregorian date specified in the deviation should correspond to one of 29th, 30th or 31th days of the Hijri calendar.

  • Numbers greater than 10 are used to subtract days, e.g: 11 --> subtract one day, 12 --> subtract two days and etc.