tags:

views:

66

answers:

1

I've been asked to convert some contitionl formatting from an excel spreadsheet into xsl for use in SharePoint.

The table we're outputting contains a due date, basically I need the following to happen:-

When due date is equal to current date add css class red When current date is four or less days before the due date add css class Amber Everything else has css class green.

I'm completelty stumped, can anyone offer any ideas?

A: 

If I were you, and if I were using XSLT 1.0, I would use the EXSLT date functions to get the current date and then use date:difference to determine the time difference between the two dates. Then you just need an xsl:choose that contains your 3 cases (equal, less than 4 days, otherwise) and output the CSS you need.

carolclarinet