Hi folks,
please, could you help me to solve following issue?
The problem is, that in first column I have for example today's date. In the second I could have different date, could be future date or past date. Column number 3 could be empty, could be with future date or could be with 01/01/0001 00:00:00 format. The fourth column should be difference between first column and the second column. But unfortunately, this is wrong in case that in third column is a different date of the second column. For example the second row: today's date is 30 of September, second column is the seventh of October and the third column is 14th of October. If the date is later than in the first column and later than the second column, the result should be something as difference between the first column and the third column + 3, but result should be in negative value in this case, because there are 14 days to go but + 3 days, so - 11 eleven days to go. In case that the third column is empty or there is a value as 01/01/0001 00:00:00, the result should be simple difference between the first column and the second column. The time is not important.
Please, I really appreciate any help, how to solve this issue.
Thank you understanding and also for any help.
Regards,
TL
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD]today date for example
27/09/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 149"]
<tbody>[TR]
[TD]26/09/2016 08:41:22[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]30/09/2016 [/TD]
[TD]07/10/2016 08:41:22[/TD]
[TD]14/10/2016 08:41:22[/TD]
[TD]-7[/TD]
[TD]-11[/TD]
[/TR]
[TR]
[TD]30/09/2016 [/TD]
[TD]07/10/2016 08:41:22[/TD]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD]01/01/0001 00:00:00[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]-7[/TD]
[TD]-7[/TD]
[/TR]
</tbody>[/TABLE]
please, could you help me to solve following issue?
The problem is, that in first column I have for example today's date. In the second I could have different date, could be future date or past date. Column number 3 could be empty, could be with future date or could be with 01/01/0001 00:00:00 format. The fourth column should be difference between first column and the second column. But unfortunately, this is wrong in case that in third column is a different date of the second column. For example the second row: today's date is 30 of September, second column is the seventh of October and the third column is 14th of October. If the date is later than in the first column and later than the second column, the result should be something as difference between the first column and the third column + 3, but result should be in negative value in this case, because there are 14 days to go but + 3 days, so - 11 eleven days to go. In case that the third column is empty or there is a value as 01/01/0001 00:00:00, the result should be simple difference between the first column and the second column. The time is not important.
Please, I really appreciate any help, how to solve this issue.
Thank you understanding and also for any help.
Regards,
TL
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD]today date for example
27/09/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 149"]
<tbody>[TR]
[TD]26/09/2016 08:41:22[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]30/09/2016 [/TD]
[TD]07/10/2016 08:41:22[/TD]
[TD]14/10/2016 08:41:22[/TD]
[TD]-7[/TD]
[TD]-11[/TD]
[/TR]
[TR]
[TD]30/09/2016 [/TD]
[TD]07/10/2016 08:41:22[/TD]
[TD][TABLE="width: 134"]
<tbody>[TR]
[TD]01/01/0001 00:00:00[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]-7[/TD]
[TD]-7[/TD]
[/TR]
</tbody>[/TABLE]