'how to get Arabic Month Names in sql?

I am trying hard to get the 12 months names in Arabic , I tried a lot but nothing work. any help ?



Solution 1:[1]

I apologise if my spelling is incorrect: I've made the assumption that you are selecting results from a table with either a date or datetime field.

select
    case (datepart(month, *DateField*))
    when 1 then N'Mu?arram'
    when 2 then N'?afar'
    when 3 then N'Rab?‘ al-awwal'
    when 4 then N'Rab?‘ ath-th?n?'
    when 5 then N'Jum?dá al-?lá'
    when 6 then N'Jum?dá al-?khirah'
    when 7 then N'Rajab'
    when 8 then N'Sha‘b?n'
    when 9 then N'Rama??n'
    when 10 then N'Shaww?l'
    when 11 then N'Dh? al-Qa‘dah'
    when 12 then N'Dh? al-?ijjah'
    end
from *Table*

Solution 2:[2]

CASE WHEN CMonth=1 THEN N'?????' 
      WHEN CMonth=2 THEN N'??????' 
      WHEN CMonth=3 THEN N'????' 
      WHEN CMonth=4 THEN N'?????' 
      WHEN CMonth=5 THEN N'????' 
      WHEN CMonth=6 THEN N'?????' 
      WHEN CMonth=7 THEN N'?????' 
      WHEN CMonth=8 THEN N'?????' 
      WHEN CMonth=9 THEN N'??????' 
      WHEN CMonth=10 THEN N'??????' 
      WHEN CMonth=11 THEN N'??????' 
      WHEN CMonth=12 THEN N'??????' END

-_-

Solution 3:[3]

SELECT FORMAT(GETDATE(), 'MMMM', 'ar-eg') AS arabic_Month_Name
SELECT FORMAT(GETDATE(), 'MMMM yyyy', 'ar-eg') AS arabic_Month_Name_With_Year
SELECT FORMAT(GETDATE(), 'dd-MMMM-yyyy', 'ar-eg') AS arabic_Month_Name_Date

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Bishoy Ezzat
Solution 3 Peter Reda