There are two CONVERT styles that are available in SQL Server 2000 to support Hijri dates:
130 - Returns the date via the Hijri calendar, in dd mon yyyy hh:mi:ss:mmmAM format.
131 - Returns the date via the Hijri calendar, in dd/mm/yy hh:mi:ss:mmmAM format.
For example, to convert a date to Hijri format in Transact-SQL, you would use syntax such as the following:
SELECT CONVERT(nchar, GETDATE(), 131)
This query will return a string such as the following in its result set:
The reverse operation is also possible. The following syntax would be used to go in the opposite direction:
SELECT CONVERT(datetime, ' 7/05/1421 12:14:35:727PM', 131)
This query would convert the date to SQL Server datetime type, which in Query Analyzer would look like: