2.7. Create Dates and Times from Strings
Problem
You need to create a System.DateTime or System.DateTimeOffset instance that represents the time and date specified in a string.
Solution
Use the Parse/TryParse or ParseExact/TryParseExact methods of the DateTime or DateTimeOffset structure.
|
Get Visual Basic 2008 Recipes: A Problem-Solution Approach 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.