View Single Post
  #6  
Old May 8th, 2009, 06:35 PM posted to microsoft.public.access
[email protected]
external usenet poster
 
Posts: 129
Default Criteria for results in report of previous year

Perhaps its as well to make clear that that only applies to entering
criteria in query design view where Access will automatically convert
UK format dates to US format dates in the query's SQL on systems with
UK regional date settings.

In SQL or VBA date literals must be in US format or an otherwise
internationally unambiguous format. #1/10/07# would be interpreted as
10 January 2007; #31/12/07# would be interpreted correctly as 31
December 2007 but only due to the unambiguous nature of the date. Its
probably best to stick with the ISO standard of YYYY-MM-DD:

WHERE AccountsDate BETWEEN #2007-10-01# AND #2007-12-31#

Ken Sheridan
Stafford, England

On May 8, 12:45 pm, "KC-Mass" connearney_AT_comcast_Period_net
wrote:
If it is a date/Time field then I assume it contains the year so if you want
the data for the second quarter of FY 07 then look for dates Between
#1/10/07# and #31/12/08#

"reterrig" wrote in message

...

My table includes only field with the Date/Time


"KC-Mass" wrote:


Does your table not include a field with the FiscalYear??


"reterrig" wrote in message
...
I have created an account file for a fiscal year that begins 1st July
and
ends 30th June of the next Year.
I Need a report for each quarter separately. My Table "Accounts" has a
field "Accountsdate". In the relevant query of the report "First
Quarter"
in
the Criteria of the field "Accountsdate" I have inserted
"[Accounts].AccountsDate Between 1/10 And 31/12".
Report only shows the results of the dates between 1/10 and 31/12 but
of
the
present year.
I need the report to show results of the quarter of the previous year