cancel
Showing results for 
Search instead for 
Did you mean: 
pit850
Nintex Newbie

Workflow with Date calculation

Google Übersetzer

Hi Guys,

I need your help. In Sharepoint and workflow is quite a newbie and would like to take your support.

We have in the Sharepoint a calendar, which we use for our holiday recordings. I have created a workflow with Nintex for this calendar. This also works in the basic settings.

Now to my request:

The workflow should only be started if the holiday time is longer than 5 days, if smaller than or equal to then just send an email to the GroupOwner and the Approver.

How can I start a calculation in the workflow to determine the days from the start date and end date?

Also the determination of the group does not work, he always pulls the AD group.

I've created several groups with one owner. But somehow, the workflow seems to ignore them.
Reply
10 Replies
Automation Master
Automation Master

Re: Workflow with Date calculation

you have several options

- you can use Math action.

note however, that this returns difference in seconds, so you might need to converts it to days

- or you can use set variable action and use inline function DateDiffDays to do calculation.

problem here is that set variable action allows to define formula only if target variable is of string type. so for further comparisons you might need to convert numeric variable

- or you can use ConvertValue action.

this should be straightforward and return day difference into numaric variable

‌ date difference‌

Reply
pit850
Nintex Newbie

Re: Workflow with Date calculation

many thanks for your answer

0 Kudos
Reply
Automation Master
Automation Master

Re: Workflow with Date calculation

‌, if that helped you to resolve your issue, please mark the answer correct

0 Kudos
Reply
pit850
Nintex Newbie

Re: Workflow with Date calculation

Hi,

i tested with function "convert value", i get error messages

with this variable

but after running i have this error message

i have try with integer and number, same result.

Do i have to convert the date before?

maybe someone can help

0 Kudos
Reply
Automation Master
Automation Master

Re: Workflow with Date calculation

try to enclose date variables with {TextStart}/{TextEnd} as in my example

0 Kudos
Reply
pit850
Nintex Newbie

Re: Workflow with Date calculation

Hi,

Google Übersetzer

I've tried it with your preferences. unfortunately the same mistake. Do I need to format the date?
0 Kudos
Reply
Automation Master
Automation Master

Re: Workflow with Date calculation

can you check what's your configuration for "Always follow web settings" in User >> My Settings >> My Language And Region  >> Region

0 Kudos
Reply
pit850
Nintex Newbie

Re: Workflow with Date calculation

is the setting for language and region relevant to the functionality of the workflow? it is set to German.
i tested with seetings for english and i have same Error. 
Workflow Details
Error parsing value. Value 'fn-DateDiffDays (9/26/2017 11:59 PM,9/20/2017 12:00 AM)' is not compatible with the selected output variable type Number (double).

I have no idea what i can change,
0 Kudos
Reply
akrasheninnikov
Nintex Newbie

Re: Workflow with Date calculation

You can format the dates using ISO template: yyyy-MM-dd hh:mm:ss

0 Kudos
Reply