Query

J

Jacob

I have a form where I am pulling data from a query. In the query, I have
a datedif function that is showing all day accumilated based on certain
factors. I want the dates to show only for the current year. not all years.
here is what I have ...


Days accured: DateDiff("d",[hDate],Date())

So if the start date is in the year 2001 I am totalling days all the way
back to then. How can I have this show only dates in the current year,
2003???
 
C

Cameron Sutherland

I'm not sure if I understand you correclty but why not
make a new column in your query that gets the year value
and put a criteria on that column of 2003:
GetCurrentYear: Format("yyyy",[hDate])
criteria=Format("yyyy",Date())

-Cameron Sutherland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top