Page 1 of 1
Formating Values
Posted: Fri Jun 23, 2006 3:13 am
by EDV Gradl
When I have a datetime field {Date} and use the format option of the text box it works fine.
But when write something before the field like : Invoice date: {Date} the format does not apply, because of the extra text.
How do I use formattings in the text box?
Thanks!
Formating Values
Posted: Fri Jun 23, 2006 4:17 am
by Edward
EDV wrote:When I have a datetime field {Date} and use the format option of the text box it works fine.
But when write something before the field like : Invoice date: {Date} the format does not apply, because of the extra text.
How do I use formattings in the text box?
Thanks!
You can use standard formatting, providing by .Net Framework, for example:
Code: Select all
Invoice date: {Date.ToString("MM.dd.yyyy")}
But also you can use a trick:
Code: Select all
Invoice date: {this.Text3.TextFormat.Format(Date.Date)}
Where Text3 - our textbox. And the this.Text3.TextFormat.Format() method applies custom format that you have selected for the Text3 object in context menu.
In next version mechanizm of formatting will be greatly improved.