我已将CRM中的日期时间保存为2017年8月1日上午12:00。
但当我在FetchXML的帮助下检索这些数据时,我得到的是2017年7月31日下午6:30
protected void Application_BeginRequest()
{
CultureInfo info = new CultureInfo(System.Threading.Thread.CurrentThread.CurrentCulture.ToString());
info.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
System.Threading.Thread.CurrentThread.CurrentCulture = info;
}
和web。配置文件-
<globalization culture="en-GB" />
foreach (var item in result2.Entities)
{
model.SightTestDate = Convert.ToDateTime(item["oph_claimreceiveddate"]);
}
给我的日期是2017年7月31日下午06:30
我错过了什么?