|
-
Oct 15th, 2005, 04:09 PM
#1
Thread Starter
New Member
Converting date help
VB Code:
Function Convert_Date_Int2Str(Date_Int As String) As String
Select Case Date_Int
Case 1
Convert_Date_Int2Str = "January"
Case 2
Convert_Date_Int2Str = "February"
Case 3
Convert_Date_Int2Str = "March"
Case 4
Convert_Date_Int2Str = "April"
Case 5
Convert_Date_Int2Str = "May"
Case 6
Convert_Date_Int2Str = "June"
Case 7
Convert_Date_Int2Str = "July"
Case 8
Convert_Date_Int2Str = "August"
Case 9
Convert_Date_Int2Str = "September"
Case 10
Convert_Date_Int2Str = "October"
Case 11
Convert_Date_Int2Str = "November"
Case 12
Convert_Date_Int2Str = "December"
End Select
End Function
Hi All
Im still working on my project here is another one for you all
when my program runs it accepts day , month, year from list boxes.
the boxes are text. Now i have to convert them to numbers uptop i only have the one for the month. Is there a easyer way????
Thanks Ed
-
Oct 15th, 2005, 04:33 PM
#2
Re: Converting date help
Just use the MonthName()
VB Code:
Option Explicit
Private Sub Form_Load()
MsgBox MonthName(8)
End Sub
-
Oct 15th, 2005, 07:36 PM
#3
Lively Member
Re: Converting date help
and from a date e.g. 24/01/1984...
VB Code:
MsgBox MonthName(Month(thedatehere))
-
Oct 15th, 2005, 08:14 PM
#4
Re: Converting date help
Or else use a Date Time Picker, so they can pick a day off the calendar.
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
|