Sutekh
Workflow Hero

Converting the difference between two date variables into years and months

Afternoon

 

I have two variables set on two lists, the fields are a Start Date and a Leaving Date. I'm using a Math Op action (shown below) to work out the difference. With a Start Date of 8/9/20 and a Leave Date of 30/09/20 the Difference_start_finish variable is giving me: 3810412800. How would I convert this into days/months/years. I've tried to use a Convert value action but it makes the workflow error. Any suggestions? All advice welcome


Date_difference.png

0 Kudos
Reply
1 Reply
ahaaften
Cloud Wanderer

Re: Converting the difference between two date variables into years and months

Those always come back weird, has something to do with the start date of the digital clock, like from 1900.

 

Best way to do it is to use a inline function:
fn-DateDiffDays(start date, end date)
fn-DateDiffHours(start date, end date)
fn-DateDiffMinutes(start date, end date)
fn-DateDiffSeconds(start date, end date)

 

You'll have to use the full format date in your region.

 

Example:

2020-09-30_181302.png

 

Some more info:
https://help.nintex.com/en-us/nintex2013/help/Workflow/RootCategory/Designer/Nintex.Workflow.InlineF...

 

0 Kudos
Reply