mailmarge date format in word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi folks

I have a large database which has various fields with dates held in
numerical format. I would like days to be shown in mail merge documents as,
eg 1st 22nd 3rd, etc. and have tried using the pattern "Dte"\@ "dddd, d MMMM,
yyyy" in the mergefield, but this only gives me the US format of the date-day
as a number.

Does anyone have any bright ideas?

Many thanks

Jack
 
How about:

Function Ordinal (ByVal X As Integer) As String
Select Case Abs(X Mod 10)
Case 1: Ordinal = X & IIf(Right(X, 2) = 11, "th", "st")
Case 2: Ordinal = X & IIf(Right(X, 2) = 12, "th", "nd")
Case 3: Ordinal = X & IIf(Right(X, 2) = 13, "th", "rd")
Case Else: Ordinal = X & "th"
End Select
End Function
 
Back
Top