I have an Asp.net application in which i have to display all dates in arabic langage . So i used this function :
Public Function ConvertDateToArabic(ByVal _date As DateTime) As String
Dim arabicdate As String = ""
arabicdate += _date.Year.ToString()
Select Case _date.Month
Case "1"
arabicdate += "جانفي "
Exit Select
Case "2"
arabicdate += "فيفري "
Exit Select
Case "3"
arabicdate += "مارس "
Exit Select
Case "4"
arabicdate += "أفريل "
Exit Select
Case "5"
arabicdate += "ماي "
Exit Select
Case "6"
arabicdate += "جوان "
Exit Select
Case "7"
arabicdate += "جويلية "
Exit Select
Case "8"
arabicdate += "أوت "
Exit Select
Case "9"
arabicdate += "سبتمبر "
Exit Select
Case "10"
arabicdate += "أكتوبر "
Exit Select
Case "11"
arabicdate += "نوفمبر "
Exit Select
Case "12"
arabicdate += "ديسمبر"
Exit Select
Case Else
Exit Select
End Select
arabicdate += " " + _date.Day.ToString() + " "
Return arabicdate
End Function
But i got wrong results for example if i put 4th 2014 i got as result 2014 فيفري 4
- What is the reason of this problem?
- How can i fix it?