Are you in Excel (This is the PowerPoint section!)
Maybe:
Sub getdate()
Dim myDate As Date
myDate = ActiveSheet.Range("A1")
ActiveSheet.Range("A1") = getDay(Day(myDate)) & " " & MonthName(Month(myDate))
End Sub
Function getDay(dayNum As Long) As String
Select Case dayNum
Case Is = 1, 21, 31
getDay = dayNum & "st"
Case Is = 2, 22
getDay = dayNum & "nd"
Case Is = 3, 23
getDay = dayNum & "rd"
Case 4 To 30
getDay = dayNum & "th"
End Select
End Function
|