2

I have a requirement to get the day of the week into a workflow variable in a SharePoint Designer Site Workflow.

This means I do not have a "Current Item" that the workflow runs on.

How can I retrieve the current date in long date format (Europe not US) into a variable in a site workflow (note: not a list or item workflow)?

1 Answer 1

2

You can do this by creating a workflow variable of type DateTime and then assigning its default value to Current Date

enter image description here

enter image description here

5
  • Current Date doesn't seem to include the day name when I do this. It doesn't return the "Long Date" format. Jan 16, 2015 at 15:22
  • If you click on [%Variable: TodayDate%] can't you see the option to return long date? Check the updated screen shot. Jan 16, 2015 at 15:25
  • when I log the output of the variable I see "16 January 2015". I have the return value set to retun Long Date. There is no day available. Jan 16, 2015 at 15:35
  • Ok. I think this is because of the regional settings of the site collection. I will look for another solution. Jan 16, 2015 at 15:37
  • I can confirm that this does not work for United Kingdom date format. It does work for US. UK format long date only returns "16 January 2015" while US format long date returns "Friday, 16 January 2015". Jan 16, 2015 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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