Calculate days since Created Date


Badge +7

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 happy.png


5 replies

Badge +16

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

Userlevel 5
Badge +13

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?

Badge +7

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.

Badge +7

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.

Badge +7

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

215553_pastedImage_3.png

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

215552_pastedImage_2.png

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

Reply