Page 1 of 1

HHJLDATE

Posted: Tue Aug 08, 2006 10:15 pm
by ray.wurlod
Does anyone have information on how to use the Oracle HHJLDATE function/procedure? With an example or two would be wonderful. This converts Gregorian to Hijrah ("Islamic") dates.

Posted: Tue Aug 08, 2006 10:21 pm
by chulett
Found something here on page 6-40 of the linked pdf. Interestingly enough, the title is Oracle7 Spatial Data Option Reference and Administrator's Guide. :?

Posted: Thu Aug 10, 2006 12:34 am
by ray.wurlod
Yes, I found that also, but the description is incomplete. We've been experimenting with it, and are getting close. Will advise conclusions in a day or three.

Actually, that's not true - the description is complete as far as it goes; HHJLDATE generates a Julian date form. What the customer wants is the Hijrah date in calendar form. But HHCLDATE is not the whole solution to that either.

Stay tuned.

Posted: Wed Aug 23, 2006 9:24 am
by ray.wurlod
That just didn't do it. This function does:

Code: Select all

create or replace Function Get_Hdate(F_Date in Date) Return Varchar2 Is
V_date Varchar2(30);
Begin
Select To_char(F_Date, 'DD/MM/YYYY', 'nls_calendar = '''||'Arabic Hijrah''')
Into V_date
From Dual ;
Return V_date;
End Get_Hdate;