YTD

  • Thread starter Thread starter Shilpa
  • Start date Start date
S

Shilpa

A couple of weeks ago I made a post asking for a query
that returns records of the current year (up to the
previous month). The criteria suggested is as follows:
=DateSerial(Year(Date()),1,1) And <DateSerial(Year(Date
()),Month(Date()),1)

The query works, except when the current month is
January. Any suggestions?
 
Shilpa said:
A couple of weeks ago I made a post asking for a query
that returns records of the current year (up to the
previous month). The criteria suggested is as follows:

()),Month(Date()),1)

The query works, except when the current month is
January. Any suggestions?

Given that your criteria is YTD "up to the previous month" what exactly do you want
it to do when run in January?
 
A couple of weeks ago I made a post asking for a query
that returns records of the current year (up to the
previous month). The criteria suggested is as follows:

()),Month(Date()),1)

The query works, except when the current month is
January. Any suggestions?

The current year up to the previous month, in January, is an empty
set.

Do you mean the *previous* year's complete data? or the data from
January 1 through today (which is of course discrepant with all the
other months)?
 
Back
Top