gearhead03
Technical User
I use a query to mail merge to a word document. I need to export 1st, 2nd 3rd, etc for the date rather than just 1, 2, 3. any help would be appreciated.
Mark A. Kale
Mark A. Kale
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function DateSuffix(dateinfo As Date)
' dateinfo = date in question
Dim sufx As String
Select Case DatePart("d", dateinfo)
' get the day from the date
Case 1, 21, 31
sufx = "st"
Case 2, 22
sufx = "nd"
Case 3
sufx = "rd"
Case Else
sufx = "th"
End Select
DateSuffix = Format(dateinfo, "mmmm d") & sufx & ", " & Year(dateinfo)
End Function