Of course, converting primitive data types isn’t restricted to numeric types. What’s more interesting is the conversion of a string into a numeric value or a date value, and vice versa. This is a very common operation, as most applications allow users to enter numeric values into TextBox controls, which contain strings, not numbers.
You can always perform the conversion by using the methods discussed in the preceding section. Here are a few examples:
Dim AStringWithDate As String = "24.12.2003" Dim ADate As DateTime ADate = CDate(AStringWithDate) ADate = CType(AStringWithDate, DateTime) ADate = Convert.ToDateTime(AStringWithDate)
There is another possibility ...