récupérer la date à partir d'un textbox
Bonjour.
j'ai le code suivant :
Code:
1 2 3
| StartDate = Session["StartDate"].ToString();
this.StartDate = StartDate.Substring(0, 2) + "/" + StartDate.Substring(3, 3) + "/" + StartDate.Substring(6, 4);
this.Start = DateTime.Parse(StartDate); |
je souhaite récupérer la date sous la forme dd/MMM/yyyy mais j'ai l'erreur suivante :*
Citation:
System.ArgumentOutOfRangeException: L'index et la longueur doivent faire référence à un emplacement situé dans la chaîne.Nom du paramètre : length
j'aimerais savoir comment m'y prendre sachant que je sélectionne la date à partir d'un calendrier.
merci