Hi Magne,
Thank you for posting.
There is an example of formatting an integer to a five number of digits
string(if the digit number of the integer is bigger than five, the
formatted string is equal to the integer).
The data type of the "Quantity" column in my DataTable is System.Int32 and
that of the "FormatQuantity" column is System.String.
dataSet11.Tables[0].Columns["FormatQuantity"].Expression =
"IIF(Len(Convert(Quantity,'System.String')) >= 5,Quantity,
SubString('00000' + Quantity, Len(convert(Quantity,'System.String')) +
1,5))";
Hope this helps.
If you have any concerns or need anything else, please don't hesitate to
let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================