MyDayName

Returns the day name in several formats
It uses either full date or only weekday number
When En1En2Ar3 = 1: Sunday
= 2: Sun
= 3: الأحد

Function MyDayName(DateSe, En1En2Ar3)
 MyDayName     = DayName1(Weekday(DateSe), En1En2Ar3)
End Function
Function DayName1(DayID, En1En2Ar3)
 If En1En2Ar3 = 1 Then
  Select case DayID
  Case 1: Rett  = "Sunday"
  Case 2: Rett  = "Monday"
  Case 3: Rett  = "Tuesday"
  Case 4: Rett  = "Wednesday"
  Case 5: Rett  = "Thursday"
  Case 6: Rett  = "Friday"
  Case 7: Rett  = "Saturday"
  End Select
 ElseIf En1En2Ar3 = 2 Then
  Select case DayID
  Case 1: Rett  ="Sun"
  Case 2: Rett  ="Mon"
  Case 3: Rett  ="Tue"
  Case 4: Rett  ="Wed"
  Case 5: Rett  ="Thu"
  Case 6: Rett  ="Fri"
  Case 7: Rett  ="Sat"
  End Select
 ElseIf En1En2Ar3 = 3 Then
  Select case DayID
  Case 1: Rett  ="الأحد"
  Case 2: Rett  ="الإثنين"
  Case 3: Rett  ="الثلاثاء"
  Case 4: Rett  ="الأربعاء"
  Case 5: Rett  ="الخميس"
  Case 6: Rett  ="الجمعة"
  Case 7: Rett  ="السبت"
  End Select
 End If
 DayName1     = Rett
End Function

DateSe, En1En2Ar3
or
DayID, En1En2Ar3

Views 1987 Downloads 604

'Arabic', 'dayname', 'dayname1', 'weekday', 'date', 'mydayname'

ANmarAmdeen
483
Date+Time Classic ASP
Revisions

v3.0