• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 42
  • Last Modified:

Set section of string to upper case in vb.net

I have a vb.net function that does this....
val = StrConv(dr(VariableField).ToString(), vbProperCase)

However within that string is time that is " Am " or " Pm "

I am trying to pick out and set just tat section to UPPER case

This is not working
val.Replace(" Am ", " AM ").Replace(" Pm ", " PM ")
Larry Brister
Larry Brister
1 Solution
Éric MoreauSenior .Net ConsultantCommented:
are you putting the result back into val?
val = val.Replace(" Am ", " AM ").Replace(" Pm ", " PM ")

Open in new window

Larry Bristersr. DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now