Display "! Updated Today" indicator just like "! New" icon in Document Library

By Namwar Rizvi - Last updated: Sunday, March 1, 2009 - Save & Share - 8 Comments

One of my cliens wanted to display “! Updated Today” icon (just like New icon) against all of those documents which are updated today so that their users can easily identify these documents. Since the customer just wanted this behaviour in some of the document libraries instead of all of them therefore, I opted to update the “AllItems.aspx” in Sharepoint Designer. By using a few lines of xsl code, I was able to achieve it. Following is the step-by-step procedure:

  1. Open the target page (normally it will be “AllItems.aspx”) in Sharepoint Designer
  2. Right click the ListViewWebPart and select Convert to XSLT Data View”
  3. context-menu

  4. Switch to Code view and search for 
    <xsl:if test="ddwrt:IfNew(string(@Created))"><IMG SRC="/_layouts/1033/images/new.gif" alt="New" /></xsl:if> 
  5. press Enter after the closing tag of above line i.e.  </xsl:if>
  6. Insert the following lines 
  7. <xsl:if test=”ddwrt:FormatDate(string(@Modified), number($Language), 1)=ddwrt:FormatDate(ddwrt:TodayIso(), number($Language), 1)”>

    <xsl:if test="ddwrt:FormatDate(string(@Modified), number($Language), 1)!=ddwrt:FormatDate(string(@Created), number($Language), 1)">

    <span style="background-color:maroon;color:white"> ! Updated Today</span>




  8. Save the file and refresh your browser.Bingo!  you will start getting “! Updated Today” indicator against all those files which are updated today similar to following:
  9. document-library1

Posted in Uncategorized • • Top Of Page

8 Responses to “Display "! Updated Today" indicator just like "! New" icon in Document Library”

Comment from Chris Sammut
Time March 5, 2009 at 11:14 am

When you convert to XSLT Data View, I lose the “edit in datasheet” functionality. Any idea how this can be resolved?



Comment from mitun
Time April 2, 2009 at 7:02 pm

When a new document is uploaded a green color text “! new” appears next to the newly uploaded document. How do I make this appear at document library level for example “shared documents ! new” whenever a new document/folder is uploaded/created in a document library?

Comment from Noble
Time October 28, 2009 at 9:32 pm

This code works great on my sharepoint list. Thank you. Is there any way to make the “! Updated Today” indicator show for the last seven days? I am not a programmer so I do not understand the formatting involved to do this. Again Thanks!!

Comment from Cis
Time March 4, 2010 at 8:40 pm

this code that I inserted into the allitems.aspx did not work. Maybe I’m missing something….can you please help me?

Comment from Cis
Time March 4, 2010 at 8:41 pm

i’d also like this for all site libraries.

Comment from namwar
Time March 4, 2010 at 10:00 pm

Hi Cis,
Are you getting any error?

Comment from Cis
Time March 9, 2010 at 3:55 pm

Thank you, I figured it out. The open quotes were Italicized. I’d like this for all sites and document libraries which file to I edit?? Thank you very much, this is awesome.

Comment from Luke T
Time October 14, 2013 at 9:46 am

Hi, I realise a long time has passed and no-one may be monitoring this article any more, but I have been trying to implement the code and I just get an error message. Is this code designed to work on a CQWP as well as a Data View? Also, can the code be placed within the ItemStyle.xsl file?

Many thanks,


Write a comment