Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET mmTextbox Date format
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01548646
Message ID:
01548697
Vues:
52
Ian,

> I'm sur ehtat this has likely been asked before, but a search of the postings I can access has not turned up anything. I have a ASP.NET project on a SQL Server database and I am attempting to use on ly the date portion of a datetime field in a textbox, but it ignores my format code in the DisplayFormat property. How does one go about using the date portion only?

Are your setting the DisplayFormat property to this?:
{0:d}
If that's not working (looks like this is an issue with ASP.NET that others have reported) you may need to manually bind the text box after converting the string to date only. If you're loading your data from a stored procedure, you can also change the sproc to return just the date portion of the date time value.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform