var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Data for Last Month
I have a query which pulls data based on a date range.
However, instead of using this, I'd like to only get data for last month.
I have tried doing this by adding 2 fields :
In each of these fields I have added a criteria of :
Year : Year(myDate)
This allows me to get the data for last month (say February), but also ensures it is only the data for this year. (as the DB holds data for the past 4 or 5 years)
The problem is though, when the year rolls over to January, this will not work.
Can anyone shed any light on an alternative please ?
Work with your dates as dates. Lookup the functions DateDiff and DateAdd in the help file - those will help you setup the query.
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
DateAdd(interval, number, date)
click to email
Independent Development Consultant
Biz db & reports - SQL, Access, Crystal, Seradex and more
Small, custom, unique programs - Office, VBA, .NET
Favorite message from Windows:
There was an error displaying the previous error message
Sadly, there was no error number to look up ...
Thanks very much - I'll look into that.