Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert Hijri Date to Gregorian Date

629 views
Skip to first unread message

Rosh

unread,
Jul 12, 2012, 2:16:38 AM7/12/12
to
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

br...@sybase.com

unread,
Jul 13, 2012, 3:53:38 PM7/13/12
to
On Thursday, July 12, 2012 12:16:38 AM UTC-6, Rosh wrote:
> 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

diasr...@gmail.com

unread,
Jul 15, 2012, 4:51:21 AM7/15/12
to
On Friday, July 13, 2012 10:53:38 PM UTC+3, br...@sybase.com wrote:
> On Thursday, July 12, 2012 12:16:38 AM UTC-6, Rosh wrote:
> > 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

br...@sybase.com

unread,
Jul 16, 2012, 12:09:15 PM7/16/12
to
>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

0 new messages