Stump the Panel » End Users and Information Workers

SPD XSL date calculation for con. formatting

(2 posts)
  • Started 1 month ago by wbbdev
  • Latest reply from Christophe
  1. wbbdev
    Member

    All
    Many thanks for your help!!!

    I have a WP that I converted to XSLT. I want to conditionally format specific cells based on the age of a record. So, for example, IF Create Date is more than 10 days old format the cell yellow. Setting the color is no problem but the XSLT data formula is and unfortunately I have not found a solution.
    The formula would look something like this
    Create Date < (current date - 10)
    Also how would one use other units of time like years, months, hours minutes or even seconds?

    Pete

    Posted 1 month ago #
  2. Working with dates in a SharePoint XSLT is not easy. See if this post from Toni Frankola helps:
    http://www.endusersharepoint.com/?p=1069
    It uses Julian dates for the calculations.

    Another approach would be to include some JavaScript. The following examples are countdowns, but you can adapt them to countups:
    http://pathtosharepoint.wordpress.com/2008/08/25/a-countdown-for-tasks-lists/
    http://pathtosharepoint.wordpress.com/2008/11/24/countdowns-a-second-method/

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.