|
-
May 16th, 2000, 09:20 PM
#1
Thread Starter
New Member
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 !
-
May 17th, 2000, 03:30 AM
#2
Member
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]
-
May 17th, 2000, 03:28 PM
#3
Thread Starter
New Member
Thanks.....I'll give it a blast !
;p
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|