My application has support for Arabic and I'm relying on sql server to convert dates from Arabic calendar to Gregorian calendar and vice versa.
The Arabic calendar is based on the lunar sighting and there is a possible difference of 1-2 days.
The country in which my application is deployed uses the Umm Al Qura Arabic calendar(Saudi Arabia, Makkah) and according to it today is
30th of Rabi Al-Thani 1432 A.H.
or simply 30/04/1432.
When the query is run to convert today's date (In Arabic) to today's Gregorian Date, SQl Server throws an exception (since SQL server uses the Kuwaiti algo for converting dates).
You can try it out using the following query:
Arabic to Gregorian throws an error (for today's date)
SELECT CONVERT(datetime, '30/04/1432 10:14:41:000AM', 131)
Gregorian to Arabic returns a tomorrow's date
SELECT Convert(nchar, GetDate(), 131)
Is there a work araound for it in SQL Server 2005 Compact Edition?
The .NET compact framework does not support the UmAlQuraCalendar class either,
so this link
View Complete Post