如何将字符串格式 CCYYMMDD(即 20120624)的日期转换为 MM/DD/YYYY(即 06/24/2012)?
我正在尝试,但它没有解析,抛出异常 jDate is not a valid datetime format
Public Shared Function ConvertJDateToDate(ByVal jDate As String) As String
Dim d As Date = Date.ParseExact("yyyyMMdd", jDate, CultureInfo.InvariantCulture)
Dim newText As String = d.ToString("MM/dd/yyyy", CultureInfo.InvariantCulture)
Return newText
End Function