From the course: Visual Basic Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Solution: Strings, dates, and parsing

Solution: Strings, dates, and parsing - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Solution: Strings, dates, and parsing

- [Instructor] I hope you had fun working on this challenge. Here's my results. Remember, your solution may be different from mine. I implemented the solution as a WPF application that has two text boxes, one for taking the start date and one for taking the interval and has a text block for showing the results. I've also implemented validation of the entry value, so if the user tries to put in an invalid value, it'll say it cannot parse the interval. That's my message to the user. See what happens with the date. Put a couple extra numbers on the end. Now I can't parse the start date. We'll set this back to a valid date and then show the results. I'm outputting three values or three lines of text. The original date, I'm showing that formatted as a long date. Then I'm showing the number of days and months to add, and then I'm showing the calculated date since this one starts in November. Adding five months calculates a date in April, and then I started with the 14th. The day is now 19th…

Contents