Reputation: 19
i'm trying to convert this string type into date time Here :
Dim podate As Label = 19/12/2016
Dim datedate As Date = Date.Now
datedate = Convert.ToDateTime(podate).toString("yyyyMMdd")
and the result it says : Input string was not in a correct format. any idea where did i wrong?
Upvotes: 0
Views: 916
Reputation: 351
You can do something like this
Dim podate as String
Dim podateToString as String
podate = "19/12/2016"
podateToString = podate
podateToString.ToString("yyyyMMdd")
Upvotes: 1