Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am not sure of how to use expression in sharepoint designers. I have a variable called date, but its type string. I am attaching the workflow when an event is created. I need to SET the variable date to the START DATE of the event.

But I need a particular format YYYYMMDD

Something like this maybe:

=YEAR(Current Item:StartTime) + MONTH(Current Item:StartTime) + DAY(Current Item:Start Time)

enter image description here

share|improve this question
    
or is there any other way to do it? –  L.V. Sharepoint Architect Mar 19 '12 at 15:49
add comment

1 Answer 1

up vote 6 down vote accepted

Using the link at the bottom, I created a designer workflow that will accomplish the above requirement.

*I should also note that ISODatetime should be a string, as well as dateYear, dateMonth, and dateDay

Workflow Overview Concatenation

http://weblogs.asp.net/wesleybakker/archive/2010/12/28/get-datepart-in-sharepoint-designer-workflow.aspx

P.S.

As for why it is done this way...

SharePoint designer does not support free calculation as you would in say a c# programmed workflow or any type of code solution. In order to do calculations with SPD you have to use the given functions available and only those functions. Any type of calculation similar to the above would just be written out as plain text.

Let me know if you have any questions!

share|improve this answer
    
Is this possible to do this in 2007? –  user10153 Aug 17 '12 at 15:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.