Conditional Formatting

I need to know how to code in XSL for SharePoint 2010 (via SharePoint Designer) the following statement for a webpart:

If the created date of an item is older than two days, show alert icon on alert column.
Web Part
The conditional formatting would be something like this:

<td align="center">
            <xsl:attribute name="style">
                        <xsl:if test="ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Created))) &lt; ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today)))" ddwrt:cf_explicit="1">color: #FF0000;</xsl:if>
            <span class="fa fa-exclamation" />

I have not been able to get this to work. It is a custom webpart with filters already applied to it.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McAllister MVPSharePoint ConsultantCommented:
I did something very similar to that here;

See if that guidance helps.
DreyTechAuthor Commented:
Hello Jamie! Thank you for the prompt answer, it is helpful, however, this is not what I am looking for.

I need to show the alert icon if a case has been open for more than 2 days. So if for example I were to create a case today (june 11, 2015), the alert icon should pop up two days later (june 13, 2015).

Is there any way to calculate this using xsl so that I can use it on my webpart?
Jamie McAllister MVPSharePoint ConsultantCommented:
I dabble in XSL, but I'm not able to present a full expression here for use outside of SPD. What I can do is show you how to do it like the tutorial I wrote.

You'd follow the steps on my blog but when defining the expression click Advanced;
Advanced button
The XSL to use is this; not(ddwrt:IfNew((ddwrt:GenDisplayName(string($thisNode/@Created)))))

This will highlight anything created more than two days ago.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.