If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Diff
This expression in a query returns a date differance.
If the dates in both values are the same it returns "0" which makes sense but is there a way to default a zero to "1"? Another words is an appeal is opened and closed the same day I need this to return "1". Appeals: DateDiff('d',[received],[closed]) thanks |
#2
|
|||
|
|||
Date Diff
Appeals:
IIF(DateDiff('d',[received],[closed])=0,1,DateDiff('d',[received],[closed])) -- KARL DEWEY Build a little - Test a little "Dan @BCBS" wrote: This expression in a query returns a date differance. If the dates in both values are the same it returns "0" which makes sense but is there a way to default a zero to "1"? Another words is an appeal is opened and closed the same day I need this to return "1". Appeals: DateDiff('d',[received],[closed]) thanks |
#3
|
|||
|
|||
Date Diff
Perfect
Thanks "KARL DEWEY" wrote: Appeals: IIF(DateDiff('d',[received],[closed])=0,1,DateDiff('d',[received],[closed])) -- KARL DEWEY Build a little - Test a little "Dan @BCBS" wrote: This expression in a query returns a date differance. If the dates in both values are the same it returns "0" which makes sense but is there a way to default a zero to "1"? Another words is an appeal is opened and closed the same day I need this to return "1". Appeals: DateDiff('d',[received],[closed]) thanks |
#4
|
|||
|
|||
Date Diff
Dan @BCBS wrote:
This expression in a query returns a date differance. If the dates in both values are the same it returns "0" which makes sense but is there a way to default a zero to "1"? Another words is an appeal is opened and closed the same day I need this to return "1". Appeals: DateDiff('d',[received],[closed]) IIf(received=closed, 1, DateDiff('d',received,closed)) -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|