-
I have dates which i need to perform calucations upon (add 14 days to etc), which are held in a database. I can easily do this by using the DateAdd function. The only problem being is that I can only format the date into the following format:-
21 June 2000
When I need the date to be in the format:-
21st June 2000
Any ideas would be much appreciated !
Thanx !
-
Interesting. If you try to place strDayDate into the Format(Now, "..."), it gives you something like 17t16 May 2000.
What follows works correctly, even though it's ugly.
Dim strDayDate As String
Dim nDay As Integer
nDay = CInt(Day(Now))
Select Case nDay
Case 1, 21, 31
strDayDate = nDay & "st"
Case 2, 22
strDayDate = nDay & "nd"
Case 3, 23
strDayDate = nDay & "rd"
Case Else
strDayDate = nDay & "th"
End Select
Debug.Print strDayDate & Format(Now, " mmm yyyy")
[Edited by cfmoxey on 05-18-2000 at 09:25 AM]
-
Thanks.....I'll give it a blast !
;p