I would like one field in my report to read 1st day of June 2007 or whatever
the date is, the date stored in the table and query is 1 June 2007. How can
I get these dates to change automatically in the report? Thank you so much
for yur help.
Copy and Paste this function into a new module:
Public Function DateOrdinalEnding(DateIn, MoIn As String)
' Will add an Ordinal ending to a date
' i.e. 30th day of Novermber 2000
' MoIn determines Month Format, i.e. "mmm" for "Nov" or "mmmm" for
"November".
If IsNull(DateIn) Then
DateOrdinalEnding = ""
Exit Function
End If
Dim dteX As String
dteX = DatePart("d", DateIn)
dteX = dteX & Nz(Choose(IIf((Abs(dteX) Mod 100) \ 10 = 1, 0,
Abs(dteX)) Mod 10, "st", "nd", "rd"), "th")
DateOrdinalEnding = dteX & " day of" & Format(DateIn, " " & MoIn & "
yyyy")
End Function
==============
You can call it from an unbound text control on your report:
= DateOrdinalEnding([DateField],"mmmm")