Discussion:
Convert Hijri Date to Gregorian Date
(too old to reply)
Rosh
2012-07-12 06:16:38 UTC
Permalink
Hi Experts,

I wanted help with converting Hijri Date to Gregorian Date and visa
versa in Sybase.

A lot of googling helped me find how to do it in Oracle,

select to_char(sysdate,'DD/MM/YYYY','NLS_CALENDAR=''Arabic
Hijrah''') ,to_char(sysdate,'DD/MM/
YYYY','NLS_CALENDAR=''Gregorian''')
from dual

If any one has any clue how it can be done in Sybase will be greatly
appreciated.

Cheers,
Rosh
b***@sybase.com
2012-07-13 19:53:38 UTC
Permalink
Post by Rosh
Hi Experts,
I wanted help with converting Hijri Date to Gregorian Date and visa
versa in Sybase.
A lot of googling helped me find how to do it in Oracle,
select to_char(sysdate,'DD/MM/YYYY','NLS_CALENDAR=''Arabic
Hijrah''') ,to_char(sysdate,'DD/MM/
YYYY','NLS_CALENDAR=''Gregorian''')
from dual
If any one has any clue how it can be done in Sybase will be greatly
appreciated.
Cheers,
Rosh
There is nothing direct built-in at this time. The easiest way
to do it would probably be to enable the ASE Java feature and import
a Java class that can do the conversion. I found several
possible implementations via google without any trouble.

-bret
d***@gmail.com
2012-07-15 08:51:21 UTC
Permalink
> Hi Experts,
>
> I wanted help with converting Hijri Date to Gregorian Date and visa
> versa in Sybase.
>
> A lot of googling helped me find how to do it in Oracle,
>
> select to_char(sysdate,'DD/MM/YYYY','NLS_CALENDAR=''Arabic
> Hijrah''') ,to_char(sysdate,'DD/MM/
> YYYY','NLS_CALENDAR=''Gregorian''')
> from dual
>
> If any one has any clue how it can be done in Sybase will be greatly
> appreciated.
>
> Cheers,
> Rosh
There is nothing direct built-in at this time. The easiest way
to do it would probably be to enable the ASE Java feature and import
a Java class that can do the conversion. I found several
possible implementations via google without any trouble.
-bret
Thanx for the reply Bret... Enabling Java is not an option for us...
can u throw some more light on " I found several
possible implementations via google without any trouble"
b***@sybase.com
2012-07-16 16:09:15 UTC
Permalink
Post by d***@gmail.com
Thanx for the reply Bret... Enabling Java is not an option for us...
can u throw some more light on " I found several
possible implementations via google without any trouble"
Searching Google for "hijri java gregorian" produced several
hits on sites that appear to be offering Java code for doing the conversion.


Cheers,
-bret

Loading...