date calculation

do not know if this can be done with SharePoint calculation.

what i am trying to do is calculate between two or three dates. i know the formula for calculating between two dates but it is the latter that i am trying to figure out.

right now i know how to calculate between two dates but wondering if it will allow me to calculate to another date if that field is filled in. So if field one is the auto today date and field two is the begin date and field three is another date filled in at a later date.

i want it for the time being to calculate the number of days between field one and field two it gives me the number of days. then if field three gets filled in then it calculates the number of days between field one and field three.

any help would be greatfull

erick

Thank you for the response and help. the first response work with a little tweek as i was not working at first.

the last bit of DateThree-DateOne should actually be DateThree-DateTwo

thank you

2 Answers

Try this:

=IF(ISBLANK(DateThree),(DateTwo-DateOne),(DateThree-DateOne))

Try using below formula:

=IF(ISBLANK([3rd Date Column]), DATEDIF([1st Date Column], [2nd Date column],"d"), DATEDIF([1st Date Column], [3rd Date column],"d"))

Reference:

Note:

1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
2. Return your calculated field as Number.