Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Today's Date in XSLT SharePointDesigner

  Asked By: Nakul    Date: Oct 16    Category: Sharepoint    Views: 3747

I am modyfing the XSLT of the DFWP using SPD. I want to get at today's date to
do arithmetic with it. I see that the DFWP already had

<ParameterBinding Name="Today" Location="CAMLVariable"

So I tried (in a 5-6 line stylesheet) to use/output it to prove I had it by

No luck, page would not run on server. I also tried without $.



2 Answers Found

Answer #1    Answered By: Santana Osborn     Answered On: Oct 16

Without knowing your 5-6 liner there are two things that comes to my mind

1. Did you add <xsl:param name="Today"> inside your stylesheet?
Without that your ParameterBinding won't be accessible inside the XST
2. Check your ViewFlag parameter. If it's 0 (which is the default if you use
"insert selected field as" from a data source) set it to something else.
Without knowing the intrinsics of the DFWP I never had issue with e.g 9.

Answer #2    Answered By: David Brown     Answered On: Oct 16

The blog examples I was copying from were incorrect, they had typos, and
I don't know enough XSLT to recognize the syntax mistakes.

It should be:
<xsl:param name="Today"/>

and then you can reference $Today in your XSLT as you wish.

Of course, all you guys-gals know that.

Didn't find what you were looking for? Find more on Today's Date in XSLT SharePointDesigner Or get search suggestion and latest updates.