Date Diff

L

lmossolle

I am using office 2007 and in need of help to find the age of item. Could
someone please assist?

I have a table named table, I have a Date_Rec ands would like to determine
what the age was if Complete = No.

Thanks!!!!
 
J

John W. Vinson

I am using office 2007 and in need of help to find the age of item. Could
someone please assist?

I have a table named table, I have a Date_Rec ands would like to determine
what the age was if Complete = No.

Thanks!!!!

Age in... years? days? Seconds? What do you want to see if Complete is Yes?

You'll want to use the DateDiff() function but you'll need to post more
details.
 
L

lmossolle

In Days, sorry for the delay!!!!

John W. Vinson said:
Age in... years? days? Seconds? What do you want to see if Complete is Yes?

You'll want to use the DateDiff() function but you'll need to post more
details.
 
L

lmossolle

If complete = No

John W. Vinson said:
Age in... years? days? Seconds? What do you want to see if Complete is Yes?

You'll want to use the DateDiff() function but you'll need to post more
details.
 
R

raskew via AccessMonster.com

Here's a working example you should be able to modify to fit your scenario.

SELECT tblTransfer.PymtID, tblTransfer.Category, tblTransfer.Vendor,
tblTransfer.ExpDte, tblTransfer.LoanExp, DateDiff("d",[expdte],Date()) AS
Expr1
FROM tblTransfer
WHERE (((tblTransfer.LoanExp)=False));


[ExpDte] is a date field, [LoanExp] is a boolean (Yes/No) field.

HTH - Bob
lmossolle said:
If complete = No
[quoted text clipped - 8 lines]
You'll want to use the DateDiff() function but you'll need to post more
details.
 
J

John W. Vinson

If complete = No

Imossole, it's a bit hard to answer a question consistiong of "If complete =
no". We cannot see your screen, we don't know your table structure, etc.

I'm GUESSING that you want a Query based on some (unspecified, you didn't say)
table, with a criterion of No on the Complete field (make it "No" if that's a
text field rather than a yes/no field); in a vacant field cell in the query
type

Age: DateDiff("d", [Date_Rec], Date())
 
A

Allie12380

Got it to work

Used in my query design veiw the following:

Age: DateDiff("yyyy",[Birthdate],Date())

Thanks for the help - the link helped me to realize what I was doing wrong

Have a great day!

John W. Vinson said:
If complete = No

Imossole, it's a bit hard to answer a question consistiong of "If complete =
no". We cannot see your screen, we don't know your table structure, etc.

I'm GUESSING that you want a Query based on some (unspecified, you didn't say)
table, with a criterion of No on the Complete field (make it "No" if that's a
text field rather than a yes/no field); in a vacant field cell in the query
type

Age: DateDiff("d", [Date_Rec], Date())
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top