Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Formats and Regional Settings
Message
From
31/10/2002 14:28:14
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
To
30/10/2002 18:11:40
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00717164
Message ID:
00717488
Views:
16
I found out it will work doing this but I still wonder if there is a more elegant way.
Private Sub Command1_Click()

    Label1.Caption = MakeDate(Text1.Text)
        
End Sub

Private Function MakeDate(InputDate As String)
Dim tmpDay As Integer
Dim tmpMonth As Integer
Dim tmpYear As Integer
Dim tmpDate As Date
    
    tmpDay = Mid$(InputDate, 1, 2)
    tmpMonth = Format(InputDate, "mm")
    tmpYear = Mid$(InputDate, 8, 2)
    
    tmpDate = DateSerial(tmpYear, tmpMonth, tmpDay)
    
    MakeDate = Format(tmpDate, "dd/mmm/yyyy")
    
End Function
Previous
Reply
Map
View

Click here to load this message in the networking platform