Formatting String

  • Thread starter Thread starter Robert Manookian
  • Start date Start date
R

Robert Manookian

How do you format strings? i.e.
In VB6: Format("AB34567", "@@@@@-@@") = "AB345-67"
In .Net: ????????
 
This only works for numeric data. I what to format string text.
 
* "Robert Manookian said:
How do you format strings? i.e.
In VB6: Format("AB34567", "@@@@@-@@") = "AB345-67"
In .Net: ????????

I don't have an idea too, but it seems that the behavior of 'Format' has
changed. Formatting for strings seems to be gone according to the
documentation. Really annoying.
 
From the MSDN online:

"Examples of characters that can't be displayed as literal characters are the date-formatting and time-formatting characters (a, c,
d, h, m, n, p, q, s, t, w, y, /, and :), the numeric-formatting characters (#, 0, %, E, e, comma, and period), and the
string-formatting characters (@, &, <, >, and !)."

Seems they changed the behavior and failed to completely clean-up the documentation.

--
Al Reid


"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top