DateDiff with a Where Clause
Hello Experts,
I am trying to use a DateDiff to find the day count between 2 dates.
I need a Where Clause (blue part)
I am getting a #error though.
I am not sure if the where clause below is accurate?
I am not sure if i can use a where clause with a “datediff” like I am doing.
DayCountDD: Abs(DateDiff(“d”,[qryDrawsDecliningCumDrawn].[FundingDate],”ID=” & [qryDrawsDecliningCumDrawn].[ID] & ” And [FirstOfIDDetailpk] < ” & [qryDrawsDecliningCumDrawn].[FirstOfIDDetailpk],[DayLastBdMo]))
My original was like this and it does work (no #error) but the count is off since I dont have a where clause.
DayCountDD: Abs(DateDiff(“d”,[qryDrawsDecliningCumDrawn].[FundingDate],[DayLastBdMo]))
Any thoughts are appreciated.
thank you.
Hello Experts, I am trying to use a DateDiff to find the day count between 2 dates. I need a Where Clause (blue part)I am getting a #error though. I am not sure if the where clause below is accurate? I am not sure if i can use a where clause with a “datediff” like I am doing. DayCountDD: Abs(DateDiff(“d”,[qryDrawsDecliningCumDrawn].[FundingDate],”ID=” & [qryDrawsDecliningCumDrawn].[ID] & ” And [FirstOfIDDetailpk] < ” & [qryDrawsDecliningCumDrawn].[FirstOfIDDetailpk],[DayLastBdMo])) My original was like this and it does work (no #error) but the count is off since I dont have a where clause. DayCountDD: Abs(DateDiff(“d”,[qryDrawsDecliningCumDrawn].[FundingDate],[DayLastBdMo])) Any thoughts are appreciated. thank you. Read More