AnsweredAssumed Answered

Calculate days between dates

Question asked by bimi82 on Feb 27, 2018
Latest reply on Feb 28, 2018 by bimi82

Hello all.

 

I have created an absence list where users can select the dates which by default the time is set to 00:00

It is OK until you use the information to create a calendar.

 

example: from 27/02/2017 00:00 until 28/02/2017 00:00 > actually means 2 days

because it is the whole day of 27th as well as the whole day of 28th.

 

but majority of users would class it as 1 day only.

How to overcome this problem?

 

The form has got From Date and Until Date for selection.

 

 

The calculated value has got the formula copied from this page

https://community.nintex.com/thread/1879

 

Now, here are the issues;

 

- some users select only the FROM date example 27/02/2018 00:00 for 1 day

- some users select From 27/02/2018 00:00 Until 27/02/2018 00:00 for 1 day

 

If the times are not modified then the formula does not know what to do when 00:00 on same day.
Technically if it is 1 day then it would be like this: 27/02/2018 00:00 Until 27/02/2018 23:59

 

This is so the calendar view can pick up the date & times.

How can I make so the default timing for the UNTIL date is automatically set to 23:55 (that's highest I can select).?

 

As well as to exclude the weekends days and show only working days.

 

Examples below:

 

 

 

What is the best approach for this ?!

Outcomes