views:

841

answers:

2

Maybe I'm just crazy... So, with SPD I can add any time unit to a date and put that into a variable, but I can't seem to find anything that will let me calculate the difference between two dates. "Do Calculation" only lets me pick from numeric values. Am I missing something here? Seems like something which should be obvious.

+1  A: 

Date comparison is not available "out of the box", but there are some workarounds.

Maybe this article: How to perform date calculations and construct dynamic strings in a SharePoint Designer workflow provides the answer?

Some more related information here: Modifying Date Formats in SharePoint Designer Workflows

Colin
A: 

String and date manipulation as well as calculations are a pain in SharePoint Designer workflows. The links Colin mentioned are good, but you may also want to consider embedding C# or vb.net code directly into your SharePoint Designer Workflow (Without the need for Visual Studio).

I wrote a component that allows you to do this and blogged about it at the following URL:

http://www.muhimbi.com/blog/2009/12/embed-c-or-vb-code-directly-in.html

Muhimbi