DCount with Custom Fiscal year

steve21nj

Registered User.
Local time
Yesterday, 22:27
Joined
Sep 11, 2012
Messages
260
I have having an issue with determining how to use a customized fiscal year with a DCount function.

My Code:
Code:
[COLOR=black][FONT=Verdana]ThisYear: DCount("*","Open Issues","year([RequestDate]) = " & Year(DateAdd("y",-1,Date())))[/FONT][/COLOR]

The code only does from Jan 1, YYYY TO Dec 31, YYYY

I'd like the code to read from Oct 1, YYYY TO Sept 30, YYYY

Is there a easy fix for that?
 
Try

ThisYear: DCount("*","Open Issues","[RequestDate] Between #10/1/2012# AND #9/30/2013#")
 
Or you can generalise it by building the dates using DateSerial and Year functions.
 

Users who are viewing this thread

Back
Top Bottom