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 Query using date in the date field



 
 
Thread Tools Display Modes
  #1  
Old August 13th, 2009, 06:30 PM posted to microsoft.public.access.queries
Shoan
external usenet poster
 
Posts: 1
Default Date Query using date in the date field

In my database I have a field in my personnel table that determines the date
when a person will leave. I've been trying to create a query that will give
me the number of days equal to 365 days or sometimes 90 days from that date.
I've tried this.

Criteria: Now() = [type in number in days] departure date.

I'm so lost I don't know what to do anymore.

Shoan
  #2  
Old August 13th, 2009, 07:00 PM posted to microsoft.public.access.queries
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Date Query using date in the date field

Shoan wrote:
In my database I have a field in my personnel table that determines the date
when a person will leave. I've been trying to create a query that will give
me the number of days equal to 365 days or sometimes 90 days from that date.
I've tried this.

Criteria: Now() = [type in number in days] departure date.

I'm so lost I don't know what to do anymore.

Shoan


Did ya try hitting the F1 key? The help is reasonable...
Try DateAdd("d",[SomeDateField],90)

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200908/1

  #3  
Old August 13th, 2009, 07:04 PM posted to microsoft.public.access.queries
Kc-Mass
external usenet poster
 
Posts: 362
Default Date Query using date in the date field

Try: [Departure Date] - Date = 90

Regards

Kevin


"Shoan" wrote in message
news
In my database I have a field in my personnel table that determines the
date
when a person will leave. I've been trying to create a query that will
give
me the number of days equal to 365 days or sometimes 90 days from that
date.
I've tried this.

Criteria: Now() = [type in number in days] departure date.

I'm so lost I don't know what to do anymore.

Shoan



  #4  
Old August 13th, 2009, 07:12 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Date Query using date in the date field

Can not figure what you want. Do you want all records that will be departing
in the next [type in number in days] number of days?
Or do you want to know who departed [type in number in days] number of days
ago?

--
Build a little, test a little.


"Shoan" wrote:

In my database I have a field in my personnel table that determines the date
when a person will leave. I've been trying to create a query that will give
me the number of days equal to 365 days or sometimes 90 days from that date.
I've tried this.

Criteria: Now() = [type in number in days] departure date.

I'm so lost I don't know what to do anymore.

Shoan

  #5  
Old August 13th, 2009, 07:14 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Date Query using date in the date field

You can use the dateadd function to add a number of days to a date.

If you are trying to find persons who have a departure date between
today and 365 days from today you could use

Criteria: Between Date() and DateAdd("D",365,Date())

You can replace the 365 with your parameter prompt.

Criteria: Between Date() and DateAdd("D",[Enter Number of Days],Date())

'================================================= ===
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'================================================= ===


Shoan wrote:
In my database I have a field in my personnel table that determines the date
when a person will leave. I've been trying to create a query that will give
me the number of days equal to 365 days or sometimes 90 days from that date.
I've tried this.

Criteria: Now() = [type in number in days] departure date.

I'm so lost I don't know what to do anymore.

Shoan

 




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 05:46 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.