Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

year from mars to mars

Status
Not open for further replies.

phpatrick

Programmer
Jul 9, 2006
72
0
0
BE
what is the selectcriteria to say on a date field I need the datums from 1 april until end mars of the year after this.

In most cases you ask the data of a certain year. Thats easy, you can use the format function.

But here the year is from 1/04/2006 until 31/03/2007.
I need to tell this to my query
 


Hi,

Try this...
Code:
Where [dtField] Between DateSerial(Year(Date) - 1, Month(Date), 1) And  DateSerial(Year(Date), Month(Date), 0))


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
In the criteria cell of your date field:
Between DateSerial(Year(Date())-1,4,1) And DateSerial(Year(Date()),3,31)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top