Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Nintex Community
- :
- Forums
- :
- Nintex for SharePoint
- :
- Calculate Difference between two Date/time using C...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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!.

9 Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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:

- Create Form Variable
- Click on Form Variable button
- Click on formula, it should give you Formula Builder
- Select Runtime Functions
- Select either dateDiffDays, dateDiffHours or dateDiffMinutes, it depends on which formate you want
- Put your both date values
- Click Ok

- Add Calculated Value control on the form and add newly created variable into formula
- 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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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

Hi Shirin

Yes I definitely need help please!

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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 "

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Accept as Solution
- Email to a Friend
- Report Inappropriate Content

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