Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

ddwrt::TodayIso plus 7 days

  Asked By: Mohini    Date: May 21    Category: Sharepoint    Views: 5393

I am customizing a dashboard and need to capture data that has a date
that start a week from now. I have a column called start date. I have
all of the xsl code except the part that filters to a week from now. I
have tried a calculated column in the SharePoint list, but that display
the date into a different format.

I need the code formula for adding time onto TodayIso.

Just so everyone knows... ddwrt:TodayISO+7 doesn't work



3 Answers Found

Answer #1    Answered By: Deirdre Macias     Answered On: May 21

Date math in xsl  is tricky and I'm not sure that it can even be done. I
think that a calculated  column's format  would be easier to convert than
to try to do the date  math directly in the XSL.

Answer #2    Answered By: Kala Solomon     Answered On: May 21

A calculated column  is probably the way I
would go. But if you need to do several different calculations you
might want to try the solution referenced on this site. It uses a
Jscript function to do the Date Math and simply uses the function call
inside the XSL. Details and sourcecode can be found here:


Answer #3    Answered By: Stephen Booth     Answered On: Jul 11

We have a similar issue, albeit around displaying alerters. One of my colleagues found some code on the web to calculate the difference in days between two dates.


This works find in Sharepoint 2007 but has problems in Sharepoint 2010. Basically it interprets dates in consistently. All of our dates are UK format (dd/MM/yyyy), if the date is a legal US format it interprets it as US format but if it is not then it interprets it as a UK format. So 08/07/2011 (8th July 2011) is interpreted as August 7th 2011 (i.e. US format) but 30/06/2011 (30th June 2011) is is intepreted correctly (i.e. UK format).

I've blogged about this (including links to sites anf the things we've tried) at: sharepointbydummies.blogspot.com/.../...-time.html


Didn't find what you were looking for? Find more on ddwrt::TodayIso plus 7 days Or get search suggestion and latest updates.