Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP.NET mmTextbox Date format
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01548646
Message ID:
01548697
Views:
51
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
Previous
Reply
Map
View

Click here to load this message in the networking platform