How to convert string to date_time format?

georgewong

Member
Joined
May 11, 2006
Messages
5
Programming Experience
Beginner
Dear all

Please advise as I got another question as following:

Public Function ValidateInput(ByVal input_date As String) As Boolean
......
End Function

Since the input_date was passed by a string, how can I convert it back to date_time format? Your feedback is highly appreciate...
George
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,746
Location
Sydney, Australia
Programming Experience
10+
The Date type provides the Parse and ParseExact methods. You should read the help/MSDN topics for each for details but in short Parse will convert any one of a number of standard string representations into Date objects while ParseExact will convert a non-standard string representation as long as you know what it is to specify it.
 

Latest posts

Top Bottom