Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Formats and Regional Settings
Message
De
31/10/2002 14:28:14
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
30/10/2002 18:11:40
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00717164
Message ID:
00717488
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform