How to (try)parse a single String to DateTime in "DD/MM/YYYY" format? (VB.Net)
For example: I use input string "30/12/1999" (30 December 1999), how to (try)parse it to DateTime?
How to (try)parse a single String to DateTime in "DD/MM/YYYY" format? (VB.Net)
For example: I use input string "30/12/1999" (30 December 1999), how to (try)parse it to DateTime?
Try this:
This will throw an exception if
yourString
does not match the format you specify. If you do not want an exception in this case then do this: