求助 vb.net的格式转换
dim a as string ="20130101"
想转换成 2013/01/01 的格式 用Format 试了下,写得不对 求助
我写的代码
dim b as string = Format(cDate(a),'yyyy/mm/dd')
[解决办法]
dim a as string ="20130101"
dim b as string = string.Format("{0}/{1}/{2}", Mid(a, 1, 4), Mid(a, 5, 2), Mid(a, 7, 2))
[解决办法]
Dim b As String = Mid(a, 1, 4) & "/" & Mid(a, 5, 2) & "/" & Mid(a, 7, 2)