> 1st Jan preferred but 1 Jan acceptable
>
[quoted text clipped - 8 lines]
>>
>>Do you mean display it as 1 Jan or literally as 1st Jan?
To display the date of birth as 1st Jan:
Copy and Paste the below function into a new module.
Public Function DateOrdinalEnding(DateIn, MoIn As String)
' Will add an Ordinal ending to a date, i.e. 13th Jan, 2nd Feb, etc.
' MoIn determines Month Format, i.e. "mmm" for "Feb" or "mmmm" for
"February"
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 & Format(DateIn, " " & MoIn)
End Function
==================
You can call it from a query:
BirthdayOn:DateOrdinalEnding([DateOfBirth],"mmm")
or directly in a report or on a form, using an unbound text control:
=DateOrdinalEnding([DateOfBirth],"mmm")

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Robin Chapple - 05 Aug 2006 22:25 GMT
Fred,
I like the opportunity that this provides if I get it right. I've done
something wrong.
I think that I have followed your instructions with this result:
http://www.rotary9790.org.au/test/datefunction.html
I really would like this to work.
AND BTW the application locked and I had to use the Task manager to
exit.
Thanks,
Robin
>> 1st Jan preferred but 1 Jan acceptable
>>
[quoted text clipped - 37 lines]
>or directly in a report or on a form, using an unbound text control:
>=DateOrdinalEnding([DateOfBirth],"mmm")
fredg - 05 Aug 2006 23:51 GMT
> Fred,
>
[quoted text clipped - 55 lines]
>>or directly in a report or on a form, using an unbound text control:
>>=DateOrdinalEnding([DateOfBirth],"mmm")
The highlighted line that begins with
dteX = dteX & Nz(Choose ... etc. and the next line
Abs(dteX)) Mod ... etc. should be all on one long line.
Email messages are usually wrapped at about 70 or so characters, so
you always need to be careful when copying and pasting.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail