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

Calculate Difference between two Date/time using Calculated value in The forms

Hi all

I want to calculate the difference between two date/time using calculated value in the form, so that users can be able to see the difference when the view item

I tried using a calculated column but some how I cannot connect the calculated column to the column in the form in order to display/cannot display the column in the form

Regards

Thanks in advance!.

Labels: (3)
Reply
9 Replies
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi Michelle,

There are few ways of doing it.

You can create Form Variable and show that variable into calculated value control. please follow below steps:

  1. Create Form Variable
    1. Click on Form Variable button
    2. Click on formula, it should give you Formula Builder
    3. Select Runtime Functions
    4. Select either dateDiffDays, dateDiffHours or dateDiffMinutes, it depends on which formate you want
    5. Put your both date values
    6. Click Ok
  2. Add Calculated Value control on the form and add newly created variable into formula
  3. Publish form and it should work

Other option is , you can add Calculated Value control on the form and use above mention runtime function directly.

Thanks,

Shirin

Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Here is a pretty good tutorial using date difference already written on the forums:

How to complete Date Validation using Nintex Forms 2013 Validation Rules.

Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi Shirin

Is it possible to make the format like this - 0 days, 01  hrs,  00  mins when calculating the date difference and how do I go about doing that?

Thanks

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi Michelle,

There are 3 different runtime function (1) dateDiffDays (2) dateDiffHours (3) dateDiffMinutes.

I am sure it will help you to achieve what you after.

Let me know how you go. Let me know if you need help in your specific scenario in this, might try to create form for you and send you.

Thanks,

Shirin

Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi Shirin

Yes I definitely need help please!

Thanks

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi Michelle,

I have attached exported list form. Please import that and see if it helps.

Let me know if any questions.

Regards

Shirin

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Thank you that is what exactly I am looking for

And it helped

Thanks

Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

hello Shirin Patel

i dont know how it works, not sure if the problem is in my form

i imported yours and i also had the same outcome

days: 2

hours: 48

minutes: 2880

i modified it to get the results i wanted like below

dateDiffDays(date1, date2) + "  days  " + (dateDiffHours(date1, date2)-24*dateDiffDays(date1, date2)) + "  hrs  " + (dateDiffMinutes(date1, date2)-(60*dateDiffHours(date1, date2))) + "  mins  "

Accept as Solution Reply
Workflow Hero

Re: Calculate Difference between two Date/time using Calculated value in The forms

Hi ‌, can you mark the answer to your question? I think this post would be helpful for other Nintex connect users.

0 Kudos
Accept as Solution Reply