A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Diff



 
 
Thread Tools Display Modes
  #1  
Old April 13th, 2009, 05:06 PM posted to microsoft.public.access.queries
lmossolle
external usenet poster
 
Posts: 63
Default Date Diff

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!!!!
  #2  
Old April 13th, 2009, 05:56 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date Diff

On Mon, 13 Apr 2009 09:06:38 -0700, lmossolle
wrote:

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.
--

John W. Vinson [MVP]
  #3  
Old April 20th, 2009, 03:20 PM posted to microsoft.public.access.queries
lmossolle
external usenet poster
 
Posts: 63
Default Date Diff

In Days, sorry for the delay!!!!

"John W. Vinson" wrote:

On Mon, 13 Apr 2009 09:06:38 -0700, lmossolle
wrote:

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.
--

John W. Vinson [MVP]

  #4  
Old April 20th, 2009, 03:21 PM posted to microsoft.public.access.queries
lmossolle
external usenet poster
 
Posts: 63
Default Date Diff

If complete = No

"John W. Vinson" wrote:

On Mon, 13 Apr 2009 09:06:38 -0700, lmossolle
wrote:

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.
--

John W. Vinson [MVP]

  #5  
Old April 20th, 2009, 05:08 PM posted to microsoft.public.access.queries
raskew via AccessMonster.com
external usenet poster
 
Posts: 370
Default Date Diff

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 wrote:
If complete = No

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

[quoted text clipped - 8 lines]
You'll want to use the DateDiff() function but you'll need to post more
details.


--
Message posted via http://www.accessmonster.com

  #6  
Old April 20th, 2009, 06:43 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date Diff

On Mon, 20 Apr 2009 07:21:02 -0700, lmossolle
wrote:

If complete = No

"John W. Vinson" wrote:

On Mon, 13 Apr 2009 09:06:38 -0700, lmossolle
wrote:

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.
--

John W. Vinson [MVP]


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())

--

John W. Vinson [MVP]
  #7  
Old May 27th, 2009, 08:23 PM posted to microsoft.public.access.queries
Allie12380
external usenet poster
 
Posts: 4
Default Date Diff

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" wrote:

On Mon, 20 Apr 2009 07:21:02 -0700, lmossolle
wrote:

If complete = No

"John W. Vinson" wrote:

On Mon, 13 Apr 2009 09:06:38 -0700, lmossolle
wrote:

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.
--

John W. Vinson [MVP]


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())

--

John W. Vinson [MVP]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.