编译以下 coe 总是会遇到同样令人沮丧的错误。我正在尝试将“createdon”字段与当前日期进行比较。我尝试了几种日期格式,但仍然无法正常工作...
错误详细信息:“23/05/2012 14:01:55 的日期时间格式无效”
代码片段:
DateTime d = DateTime.Now;
String.Format("{0:dd/MM/YYYY HH:mm:ss}", d);
FetchExpression fetch = new FetchExpression(@"
<fetch distinct='false' mapping='logical'>
<entity name='" + context.PrimaryEntityName + "'><filter type='and'><condition attribute='createdon' value='" + d + "' operator='ne'></condition></filter><link-entity name='new_contrats' alias='nombreligne' from='new_contratsid' to='new_contratsid'><filter type='and'><condition attribute='new_contratsid' value='" + contrats.Id + "' operator='eq'></condition></filter></link-entity></entity></fetch>");
任何帮助都会很棒!