查了SDK也没有找到具体的说明,期望知道的朋友帮助一下,谢谢!
我的测试代码如下:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using System.Globalization;
namespace TestSPUtily
{
class Program
{
static void Main(string[] args)
{
try
{
using (SPSite site = new SPSite(http://moss:99))
{
using (SPWeb web = site.RootWeb)
{
DateTime dt = DateTime.Now;
SPUtility.ParseDate(web, dt.ToShortDateString(), dt.ToString("HH:mm:ss"), false);
}
}
}
catch (Exception ee)
{
Console.WriteLine(ee.Message);
Console.WriteLine(ee.StackTrace);
}
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using System.Globalization;
namespace TestSPUtily
{
class Program
{
static void Main(string[] args)
{
try
{
using (SPSite site = new SPSite(http://moss:99))
{
using (SPWeb web = site.RootWeb)
{
DateTime dt = DateTime.Now;
SPUtility.ParseDate(web, dt.ToShortDateString(), dt.ToString("HH:mm:ss"), false);
}
}
}
catch (Exception ee)
{
Console.WriteLine(ee.Message);
Console.WriteLine(ee.StackTrace);
}
Console.ReadLine();
}
}
}