Results 1 to 4 of 4

Thread: Converting date help

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    15

    Converting date help

    VB Code:
    1. Function Convert_Date_Int2Str(Date_Int As String) As String
    2.  
    3. Select Case Date_Int
    4.   Case 1
    5.     Convert_Date_Int2Str = "January"
    6.   Case 2
    7.     Convert_Date_Int2Str = "February"
    8.   Case 3
    9.     Convert_Date_Int2Str = "March"
    10.   Case 4
    11.     Convert_Date_Int2Str = "April"
    12.   Case 5
    13.     Convert_Date_Int2Str = "May"
    14.   Case 6
    15.     Convert_Date_Int2Str = "June"
    16.   Case 7
    17.     Convert_Date_Int2Str = "July"
    18.   Case 8
    19.     Convert_Date_Int2Str = "August"
    20.   Case 9
    21.     Convert_Date_Int2Str = "September"
    22.   Case 10
    23.     Convert_Date_Int2Str = "October"
    24.   Case 11
    25.     Convert_Date_Int2Str = "November"
    26.   Case 12
    27.     Convert_Date_Int2Str = "December"
    28. End Select
    29. 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

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Converting date help

    Just use the MonthName()

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.   MsgBox MonthName(8)
    5. End Sub

  3. #3
    Lively Member
    Join Date
    Nov 2004
    Posts
    98

    Re: Converting date help

    and from a date e.g. 24/01/1984...

    VB Code:
    1. MsgBox MonthName(Month(thedatehere))

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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
  •  



Click Here to Expand Forum to Full Width