Example
Dim orderCreatedDateRaw As String = ""
Dim tempTime As String = "201203220836"
Dim dtDate As DateTime
dtDate = DateTime.ParseExact(tempTime, "yyyyMMddHHmm", CultureInfo.CurrentCulture)
orderCreatedDateRaw = dtDate.ToString("yyyy-MM-dd")
dont forget to import "System.Globalization"
No comments:
Post a Comment