Making sure I read this right.

Prayder

Registered User.
Local time
Today, 13:13
Joined
Mar 20, 2013
Messages
303
I was wondering if
Code:
Delinquent: IIf(Date()>DateAdd("d",[Date Generated],[# of days]),"Y","N")

this means.......

If the current date (Date()) is greater than the DateAdd- which is a combination of the day, Date Generated, and # of days = yes this it is deliquent otherwise it is not?
 
If todays Date is greater than
DateGenerated + NumberOfDays Then
Delinquent ="Y" Else "N"
 
If today's date is greater than [Date Generated] + X amount of days, then return "Y".
Otherwise return "N".
 
I am curious what is the advantage / difference of using DateAdd("d",[Date Generated],[# of days])

vs.

[Date Generated] + [# of days]

Will the results always be the same?
 
I am curious what is the advantage / difference of using DateAdd("d",[Date Generated],[# of days])

I have seen a couple of cases where using aritmetic functions on DateTime fields can cause trouble.

One I remember in particular was doing a comparison of times on records coming from an ODBC linked SQL Server table.

The result was consistently reversed to what it should have been when using the Less Than comparator. I had to use the DateDiff to get the right answer.
 

Users who are viewing this thread

Back
Top Bottom