Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone know how to convert string to datetime in vb.net
Message
De
30/03/2011 08:29:15
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
Jet/Access Engine
Divers
Thread ID:
01505223
Message ID:
01505492
Vues:
36
sorry, i try your code , but it always return false........ eg(13/12/2011 or 12/13/2011)
how can i do to check date ?
Imports System.Threading
Imports System.Globalization

Public dateFormat As String = "dd/MM/yy"

    Function checkDate(ByVal c As String) As Boolean
        Dim d As Date
        Return Date.TryParseExact(c, dateFormat, CultureInfo.CurrentCulture, DateTimeStyles.AssumeLocal, d)
    End Function
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform