我从无法更改的数据Feed中获取日期和时间,因此需要将其转换为DateTime
。
字符串的格式如下。
timestamp="20131204T171054+0000"
我不得不求助于使用子字符串,这是我的代码:
Dim Date As Date = datestamp.Substring(6, 2) & "/" & datestamp.Substring(4, 2) & "/" & datestamp.Substring(0, 4) & " " &
timestamp.Substring(0, 2) & ":" & timestamp.Substring(2, 2) & ":" & timestamp.Substring(4, 2)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句