Programming 笔记

工作中遇到的问题就记载这里

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

XML schema:
<xs:element name="DateGenerated" type="xs:dateTime" minOccurs="0" />

XML file is:
<DateGenerated>27/12/2007 10:46:02 AM</DateGenerated>

VB code:
dsControlFile.ReadXml(controlFileName)

The default format of datetime is like "2002-05-30T09:00:00".
However my datetime string is like "27/12/2007 10:46:02 AM".

Solution:

If we want to use ReadXML, we have to make sure datetime string is in fixed standard format "YYYY-MM-DDThh:mm:ss".

So finally what i did is to change datetime to string.

posted on 2007-12-27 09:11  IT 笔记  阅读(793)  评论(2编辑  收藏  举报