I have a client who wants the current date to print out as:
"??? th/nd day of the month of whatever , the current year".
As in:
2nd day of the month of November, 2004
3rd day....
11th day of the month of November, 2004
I do not see an obvious way of doing this.
Any ideas?
TIA,
Aliza
--
-----------------------------------
Aliza Klein
abk...@optonline.net
-----------------------------------
While a custom function could probably deal with this I would see if you
can convince him to go to a format like...
day 2 of the month of November, 2004
day 11 of the month of November, 2004
etc...
It's almost exactly the same thing and it eliminates having to deal with
the variable "nth", "st", "rd" issue which is the only difficult part of
what he's asking for.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
>.
>
I happen to have this lying around from a newsgroup question long ago:
'----- start of code -----
Function fncOrdinal(ByVal lngNumber As Long) As String
Dim strNumber As String
strNumber = " " & lngNumber
Select Case Right$(strNumber, 1)
Case "1"
If Right$(strNumber, 2) = "11" Then
strNumber = strNumber & "th"
Else
strNumber = strNumber & "st"
End If
Case "2"
If Right$(strNumber, 2) = "12" Then
strNumber = strNumber & "th"
Else
strNumber = strNumber & "nd"
End If
Case "3"
If Right$(strNumber, 2) = "13" Then
strNumber = strNumber & "th"
Else
strNumber = strNumber & "rd"
End If
Case Else
strNumber = strNumber & "th"
End Select
fncOrdinal = Trim$(strNumber)
End Function
'----- end of code -----
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
"Rick Brandt" <rickb...@hotmail.com> wrote in message
news:2v9v82F...@uni-berlin.de...
"Dirk Goldgar" <d...@NOdataSPAMgnostics.com> wrote in message
news:eli11scx...@TK2MSFTNGP14.phx.gbl...