Click here to Skip to main content
15,909,530 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends
today i am here with a very small problem for you
i am printing item code on my reports
for example
0101010001

but i want to show
01-01-01-0001

on my reports.
can you help me plz.
Posted

1 solution

Convert your itemcode to a string (if it is not already a string) and format it likewise e.g. using string function .Insert ?
 
Share this answer
 
v2
Comments
prince_rumeel 28-Oct-11 7:10am    
bro my item code is in the form of string.but i want to show it on my report in this form
01-01-01-0001
Scubapro 28-Oct-11 7:26am    
So, if your item code always contains 10 characters, you can use:

Dim item As String = "0101010001"
item = item.Insert(2, "-")
item = item.Insert(5, "-")
item = item.Insert(8, "-")

and you're done.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900