cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Calculate days since Created Date

Hi

I hope someone can help with what I hope is a simple task? I am new to Nintex so not sure on how to do this:

How can I calculate the days since "Created"(date) on a workflow that runs daily?

When the workflow runs every day it should look at the value in a variable called daysSinceCreated and if the value is over a certain amount, take an action.

Many thanks in advance 

Labels: (2)
0 Kudos
Reply
5 Replies
Workflow Hero

Re: Calculate days since Created Date

Do you want it to run every day - what sort of actions are you planning on doing for different values?

Have you looked at this:  Site Workflow - Document Review Date Approaching Reminders

Accept as Solution Reply
Workflow Hero

Re: Calculate days since Created Date

Create a site workflow that loops through all the items in the list.  In the workflow, create a workflow variable of type Text to use to hold the date difference.  Next add a "Set variable" action to set the value of the workflow variable you just created (example name, txtDateDiff).  Configure the "Set variable" action equal to Value and click on the Insert Reference icon to the right of the field.  Then use the DateDiffDays inline function (see image below) to calculate the days between the Created date and the Current Date.

Nintex Workflow 2013 date difference

You can then use an "Update item" action in a "For Each" action to update a number column with the txtDateDiff workflow variable for each item in the list.

I used Nintex Workflow 2013 for this example.  Which version are you using?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate days since Created Date

I want it to run every day so when 15, 45 and 90 days are reached a notification reminder is sent to the person the tie list item is assigned to. When it reaches 90 days, it escalates to someone else.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate days since Created Date

Hi Eric

It seems I am a few steps behind your suggestion. Specifically, I don't know how to construct a site workflow that loops through every item in the list.

This is what I am trying to accomplish:

1. I want to create a workflow that keeps track of the days a list item is active since it's "Created" date.

2. The workflow should send a reminder to take action (not approve), every 15, 45 and 90 days.

3. The workflow stops when an item reaches over 90 days. 

The difficult bit here is step 1; getting the days since "Created" tracked every day. I tried Powershell to update the list items daily, but that didn't work due to policy restrictions.

Appreciate any help anyone can offer.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate days since Created Date

After some searching, this is what have assembled so far:

This is the configuration of the Set Variable, as per Eric's instructions.

So now the workflow should loop every on day if the item is active, update Todays Date column in the current item and then work out the difference in the days and store the value (as text?) in txtDiffDays. Finally, if txtDiffDays equals 15, it sends a notification. 

Can anyone advise if this would be the correct or workable way of achieving this?

Thanks

0 Kudos
Accept as Solution Reply