System.DateTime.Parse

This assumes that dates are in US date format "mm/dd/yyyy"
This converts a string representation to a DateTime object.


Dim sDateTimeString As String 

System.DateTime.Parse(sDateTimeString)

The Problem with CType


Dim sDateTimeString As String 
Dim objDateTime As System.DateTime

objDateTime = CType(sDateTimeString, System.DateTime)



© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext