8

Formatting and Modifying Data

Formatting data is a common task in programming languages to present data in a desired format. A programmer will also have to convert data in the same format or to a different format to allow it to be used in an algorithm.

In this chapter, we’re going to cover the following main topics:

  • Modifying string data
  • Modifying numerical data
  • Modifying date and time data
  • Formatting numeric values
  • Formatting date and time values

Modifying string data

In VB, you can modify string data using various built-in functions and operators. Here are some standard operations you can perform on string data:

Concatenation

There are a few ways to combine strings together in VB:

  • The & operator: You can concatenate strings using the ...

Get Visual Basic Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.