Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date problem
Message
De
05/09/2001 15:06:45
Randy Riegel
Zimish Contracting
Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Date problem
Divers
Thread ID:
00552743
Message ID:
00552743
Vues:
55
I am a beginner at Visual Basic. I've having problem with a text box formatting a date how I want it to. I want the date in the format mm/dd/yyyy. I go into the properties of the textbox and set the DataFormat field to that date format. The following code example will not use the format of the text box.


myDate = #4/5/2001#
Text1.Text = myDate


The above code displays the date in the textbox as m/d/yy instead of the 4 digit year i want to show.

The following is working for now but i think there should be a better way.


myDate = #4/5/2001#
Text1.Text = Format(myDate,"mm/dd/yyyy")
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform