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  

Year to Date



 
 
Thread Tools Display Modes
  #1  
Old July 20th, 2004, 09:00 PM
Alex
external usenet poster
 
Posts: n/a
Default Year to Date

How could I put restrictions in Criteria for the current
year to date in the one field and for the previous year to
date in the second field to compare the data?

Thanks


  #2  
Old July 21st, 2004, 02:09 AM
John Vinson
external usenet poster
 
Posts: n/a
Default Year to Date

On Tue, 20 Jul 2004 13:00:29 -0700, "Alex"
wrote:

How could I put restrictions in Criteria for the current
year to date in the one field and for the previous year to
date in the second field to compare the data?

Thanks


Add the table to the query grid TWICE; join by whatever key field
identifies what it is that you want to compare over years. Then in one
instance put

= DateSerial(Year(Date()), 1, 1) AND = Date()


as a criterion on the date field; in the second instance use

= DateSerial(Year(Date()) - 1, 1, 1) AND = DateSerial(Year(Date()) - 1, Month(Date()), Day(Date()))




John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old July 21st, 2004, 02:10 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Year to Date

Could you type in about 10-12 records as well as your expected display? It
would save us from making WAGs regarding what you have and what you want.

--
Duane Hookom
MS Access MVP


"Alex" wrote in message
...
How could I put restrictions in Criteria for the current
year to date in the one field and for the previous year to
date in the second field to compare the data?

Thanks




  #4  
Old July 21st, 2004, 05:20 PM
Alex
external usenet poster
 
Posts: n/a
Default Year to Date

Thanks a lot, John.
These are the formulas I needed.
How could I interpret it if my fidcal year is Aug 1 to Jul
31?

Thanks

-----Original Message-----
On Tue, 20 Jul 2004 13:00:29 -0700, "Alex"
wrote:

How could I put restrictions in Criteria for the current
year to date in the one field and for the previous year

to
date in the second field to compare the data?

Thanks


Add the table to the query grid TWICE; join by whatever

key field
identifies what it is that you want to compare over

years. Then in one
instance put

= DateSerial(Year(Date()), 1, 1) AND = Date()


as a criterion on the date field; in the second instance

use

= DateSerial(Year(Date()) - 1, 1, 1) AND = DateSerial

(Year(Date()) - 1, Month(Date()), Day(Date()))



John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
.

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM
Does date fall between two ranges? MR Worksheet Functions 4 January 14th, 2004 04:08 PM
date conversion web_time Worksheet Functions 10 December 25th, 2003 06:51 PM
type date and year has to come. shital Worksheet Functions 6 October 6th, 2003 01:49 PM


All times are GMT +1. The time now is 01:08 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.