Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the Format property of mmTextBox
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows NT
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01091044
Message ID:
01091795
Views:
15
Dave,

>I am using the mmTextBox control on a mmBusinessForm and I cannot get the Format property to work. I would like to format a Date type field as short date so I entered a “d” in the format property, but it still shows the date and time when running the form. How do I make a date with a time show as only a short date?
>
>In Appendix D, there is a list of the different commands that can be used in the Format property. This looks like the same list as found in .NET, but I am not sure. Anyway my question is, if you use the format command "d", how does it know whether you want a decimal format or a short date format? Why is there overlap?

The format strings listed in Appendix D of the MM.NET Dev Guide are specific to a particular data type...some apply to Numeric fields, some apply to DateTime fields. Try this with the mmTextBox in the MM.NET sample application. Add a text box to the Properties tab of the Customer Orders form and set the following properties:

BindingSource: Orders
BindingSourceMember: OrderDate
Format: d

You should see a short date displayed in this text box at run time.

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
Next
Reply
Map
View

Click here to load this message in the networking platform