antonyx
Arsenal Supporter
- Local time
- Today, 13:59
- Joined
- Jan 7, 2005
- Messages
- 556
hi. im using the following code to round off my dates but occasionally it goes wrong and displays as
3th
or 11st
etc
can anyone see what is wrong with the following code..
displayed as
3th
or 11st
etc
can anyone see what is wrong with the following code..
Code:
Dim datelastdigit, ending
datelastdigit = Right(Day([JobDate]), 1)
Select Case datelastdigit
Case 1
ending = "st"
Case 2
ending = "nd"
Case 3
ending = "rd"
Case Else
ending = "th"
End Select
displayed as
Code:
If Me.txtjobdate & "" <> "" Then
strBody = strBody & "<tr><td width='185'></td><td width='465'></td></tr><tr><td width='185'><font face='Arial' size='2' color='#666666'><b>Transfer date:</b></td><td width='465'><font face='Arial' size='2' color='#666666'><b> " & Format([JobDate], "dddd") & " " & Format([JobDate], "d") & ending & " " & Format([JobDate], "mmmm yyyy") & "</b></font></td></tr>"
End If