Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Geting a date from Calendar Control
Message
De
30/07/2006 10:53:24
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01141604
Message ID:
01141613
Vues:
25
It should be Substring(0, 10)

~~Bonnie

>I have a calendar control and a text box on a Web form, but the ist character is being dropped from the date (if the day has 2 digits)
>
>protected void Calendar1_SelectionChanged(object sender, EventArgs e)
> {
> txtDate1.Text = Calendar1.SelectedDate.Date.ToString().Substring(1,10);
> }
>If date is 9/07/2006 ok , but for 28/07/2006 it moves 8/07/2006
>I've tried increasing the Sibstring to (1,11) but it starts movng the time bit.
>
>Any help appreciated
>
>Regards,
>Gerard
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform