Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime fields
Message
De
20/08/2003 19:22:10
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00822047
Message ID:
00822052
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Hi, Michael.

>It cuts off the time and only gives me the date, even though strDateTime has the time. It seems like it may be due to the time in strDateTime is 12 hour time, with an AM or PM at the end.

I just tried something as simple as:
string strDateTime = "08/20/03 06:20:12 PM";
DateTime dt = DateTime.Parse(strDateTime);

Console.WriteLine(dt);
and it worked. Could you print the value of strDateTime so that we can see what's been passed to the Parse method?
Claudio Lassala
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform