Year to Date date restrictor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to create a year to date date restrictor. Right now for all of my
queries I have used between 1/1/05 and 12/31/05. I want to create one that
will automatically roll over to the next year raither than changing it to
1/1/06 and 12/31/06. Can anyone help?

Thanks,
 
ChuckW said:
Hi,

I want to create a year to date date restrictor. Right now for all
of my queries I have used between 1/1/05 and 12/31/05. I want to
create one that will automatically roll over to the next year raither
than changing it to 1/1/06 and 12/31/06. Can anyone help?

Thanks,

BETWEEN DateSerial(Year(Date()), 1,1) AND Date()
 
Hi,

I want to create a year to date date restrictor. Right now for all of my
queries I have used between 1/1/05 and 12/31/05. I want to create one that
will automatically roll over to the next year raither than changing it to
1/1/06 and 12/31/06. Can anyone help?

Thanks,

Where Year([DateField] = Year(Date())
or
Where Format([DateField],"yyyy") = Format(Date(),"yyyy")
or
Where [DateField] Between DateSerial(Year(Date()),1,1) and Date()
or if some of your records are dated into the future of the current
year ...
Where [DateField] Between DateSerial(Year(Date()),1,1) and
DateSerial(Year(Date()),12,31)
 
Back
Top