0

New here, so wondering if someone is able to help please?

Basically looking for something that will display an image ("New") if an item is no more than three days old.

Based on info I've read here so far, this is where I'm at - any help would be VERY much appreciated...

<xsl:variable name="NewImageDateLimit" select="@CreatedDate + 3"/>
<xsl:variable name="Today" select="Today()" />

<xsl:if test="$NewImageDateLimit > $Today">
  Show image
</xsl:if>
mtngeekuk
  • 31
  • 1
  • 1
  • 6
  • XSLT 1.0 has no concept of dates as such. I know nothing about Sharepoint, but I believe it provides some kind (ddwrt?) of extension to get the current date. To add 3 days to that date, write your own extension function (if that's supported) or see [here](http://stackoverflow.com/questions/23566734/date-operations-on-xsl-1-0/23569278#23569278) for a purely XSLT 1.0 method. – michael.hor257k Mar 26 '15 at 03:59
  • Many thanks for the reply @michael.hor257k - I think I need to add this to interpret as dates: ddwrt:Today() ddwrt:@CreatedDate Any help you can provide will be much appreciated... – mtngeekuk Mar 26 '15 at 08:28

0 Answers0