SharePoint Designer 2010 - 使用条件格式确定今天的日期是否在开始日期列的x天内

Ben*_*Ben 2 sharepoint sharepoint-designer conditional-formatting sharepoint-2010

我正在使用SPD 2010和Sharepoint Server 2010.

使用条件格式我正在尝试格式化列表,以便如果今天的日期超过开始日期列的3天,则单元格将变为红色.

直接比较两个日期列(以查看今天是否在开始日期之后)运作良好 -

ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($ thisNode/@StartDate)))<ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($ Today)))

但是,如果我添加一个数字,它将在SPD设计视图中工作,但不在实际的SharePoint网站上.

ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($ thisNode/@StartDate)))+ 3 <ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($ Today)))

我尝试将3转换为刻度 - > 8,640,000 /天并使用该值,但这也不起作用(并且在SPD设计视图中不起作用).

如果我创建一个计算日期为"StartDate + 3"的列然后直接比较它,我可以使格式化工作,但是,如果列不可见,它不会工作,我宁愿不创建其他列.

有任何想法吗?

谢谢你的帮助.

Ben*_*Ben 5

以下对我有用:

number(ddwrt:FormatDateTime(ddwrt:FormatDate(string($ thisNode/@ StartDate),1033,1),1033,'yyyyMMdd')+ 3)<= number(ddwrt:FormatDateTime(ddwrt:FormatDate(string($ Today)) ,1033,1),1033, '年月日'))