The ClevelandDotNet Blog is created to serve all .Net developers, both in Cleveland and elsewhere. Various .Net questions, events, and technical topics of interest will be posted regularly.
To learn more about ClevelandDotNet, visit http://www.ClevelandDotNet.info
InfoPath Date Display
Q: While working on an InfoPath form the other day, I created a text box for the sole purpose of displaying date/time. When I set the text of the field to Now(), the date appeared as "2005-10-21T13:48:51".
A: To get rid of the "T" in the middle and make the date more readable, I changed the data field type of the text box from Text to Date/Time. The date then appeared as "10/21/2005 1:48:51 PM".
String manipulation in VB2005 is fairly simple. However, things can get a little tricky with the double quote character. How do you look for it in a string? How can you insert into a string? How do you remove it from a string? These are questions that may lead to confusion if you don't know what you're looking for.
Ironically enough, in VB the double quote can also be used as an escape character when searching for it in a string. For example:
Dim strTest As String strTest = """123""" 'Displays "123" (double quotes appear in the final result) strTest = """""123""" 'Displays ""123" (double quotes appear in the final result) strTest = "test\""test" 'Displays test\"test strTest = "test""test" 'Displays test"test
In cases where you want to insert a double quote character, simply reference it unicode character designation, chr(34).…