dbTalk Databases Forums  

Convert Hijri Date to Gregorian Date

comp.databases.sybase comp.databases.sybase


Discuss Convert Hijri Date to Gregorian Date in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rosh
 
Posts: n/a

Default Convert Hijri Date to Gregorian Date - 07-12-2012 , 01:16 AM






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

Reply With Quote
  #2  
Old   
bret@sybase.com
 
Posts: n/a

Default Re: Convert Hijri Date to Gregorian Date - 07-13-2012 , 02:53 PM






On Thursday, July 12, 2012 12:16:38 AM UTC-6, Rosh wrote:
Quote:
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

Reply With Quote
  #3  
Old   
diasroshan@gmail.com
 
Posts: n/a

Default Re: Convert Hijri Date to Gregorian Date - 07-15-2012 , 03:51 AM



On Friday, July 13, 2012 10:53:38 PM UTC+3, br... (AT) sybase (DOT) com wrote:
Quote:
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='& #39;Arabic
Hijrah''&#39 ,to_char(sysdate,'DD/MM/
YYYY','NLS_CALENDAR='& #39;Gregorian''&#39
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"

Reply With Quote
  #4  
Old   
bret@sybase.com
 
Posts: n/a

Default Re: Convert Hijri Date to Gregorian Date - 07-16-2012 , 11:09 AM



Quote:
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.