Public Function DateSay(ByRef pdte As Date) As String
Dim strHold As String
strHold = Format(pdte, "dddd mmmm") & " " & NumSuffix(Day(pdte)) & " " &
Format(pdte, "yyyy")
DateSay = strHold
End Function
Public Function NumSuffix(mynum As Variant) As String
'*******************************************
'Purpose: Add suffix to a number
'coded by: raskew
'Inputs: ? NumSuffix(234)
'Output: 234th
'*******************************************
Dim n As Integer
Dim x As Integer
Dim strSuf As String
n = Right(mynum, 2)
x = n Mod 10
strSuf = Switch(n <> 11 And x = 1, "st", n <> 12 And x = 2, "nd", _
n <> 13 And x = 3, "rd", True, "th")
NumSuffix = LTrim(str(mynum)) & strSuf
End Function
To test from debug (immediate) window:
? datesay(date())
Friday March 30th 2007
HTH - Bob