首页 新闻 会员 周边 捐助

SPUtility.ParseDate使用方法

0
悬赏园豆:10 [已关闭问题] 关闭于 2008-03-30 12:57
<FONT style="BACKGROUND-COLOR: #fffbf0" face=Verdana>今天使用moss 2007中:Microsoft.SharePoint.Utilities空间下的函数,SPUtility.ParseDate,就是调用不成功,就抛出异常“值不在预期的范围内。”<BR><BR>查了SDK也没有找到具体的说明,期望知道的朋友帮助一下,谢谢!</FONT> <BR><BR>我的测试代码如下:<BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;System;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Collections.Generic;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Text;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;Microsoft.SharePoint;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;Microsoft.SharePoint.Utilities;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Globalization;<BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"><BR><IMG alt="" src="/Images/OutliningIndicators/None.gif" align=top mce_src="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000">&nbsp;TestSPUtily<BR><IMG id=Codehighlighter1_184_877_Open_Image onclick="return true;this.style.display='none'; document.getElementById('Codehighlighter1_184_877_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_184_877_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_184_877_Closed_Text').style.display='inline';" alt="" src="/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top mce_src="/Images/OutliningIndicators/ExpandedBlockStart.gif"><IMG id=Codehighlighter1_184_877_Closed_Image style="DISPLAY: none" onclick="return true;this.style.display='none'; document.getElementById('Codehighlighter1_184_877_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_184_877_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_184_877_Open_Text').style.display='inline';" alt="" src="/Images/OutliningIndicators/ContractedBlock.gif" align=top mce_src="/Images/OutliningIndicators/ContractedBlock.gif"></SPAN>&l
问题补充: 上面的测试代码没有显示完成,详细请看:http://www.cnblogs.com/zhoubin689/archive/2008/03/21/1115822.html
cdboy的主页 cdboy | 初学一级 | 园豆:50
提问于:2008-03-21 10:11
< >
分享
所有回答(1)
0
日期的转换还是比较复杂的,原因是日期字符串的可变太多,还是自个写个转换吧,呵呵,正则表达式即可
Jeason | 园豆:235 (菜鸟二级) | 2008-03-21 10:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册