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)



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