首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

怎么把2007-01-18转化为18JAN07

2011-12-27 
如何把2007-01-18转化为18JAN07如何把2007-01-18转化为18JAN07[解决办法]Dim j As StringDim i As String

如何把2007-01-18转化为18JAN07
如何把2007-01-18转化为18JAN07

[解决办法]
Dim j As String
Dim i As String = "2007-01-18 "
If "01 ".Equals(i.Substring(5, 2)) Then
j = "JAN "
End If
i = i.Substring(8, 2) & j & i.Substring(2, 2)
[解决办法]
Dim dt1 As Date = Date.ParseExact( "2007-01-18 ", "yyyy-MM-dd ", New System.Globalization.CultureInfo( "en-US "))
Dim str As String = dt1.ToString( "ddMMMyy ", New System.Globalization.CultureInfo( "en-US "))

热点排行