I have a database that hold information that holds referral dates, this database hold more than one years worth of data, and will be used in the future. We need to create update queries that will up date a field called month based on the referral date. So if the referral date is between 1/1 and 1/31 it will update to Janunary. How do we write that so it will look at more than one year? (how do we make the year wild?)
Date Range In access 2000
Collapse
X
-
Ok then tell me how to runa query for a date range say 1-1-2008 to 3-31-2008 and then display the data by month to graph it. So the graph is number of patients see per quarter graphed by month
Originally posted by FishValHi, there.
Field called month is redundant. Kill it to death.
Kind regards,
FishComment
-
Ok.Originally posted by bbjo827Ok then tell me how to runa query for a date range say 1-1-2008 to 3-31-2008 and then display the data by month to graph it. So the graph is number of patients see per quarter graphed by month
Access allows to use VBA functions (built-in and custom designed) in query.
The following queries will return:
- Month number
[code=sql]
SELECT Month(dteDate) AS lngMonth FROM tbl;
[/code] - Month name (3 letters)
[code=sql]
SELECT Format(dteDate, "mmm") AS txtMonth FROM tbl;
[/code] - Month name (full)
[code=sql]
SELECT Format(dteDate, "mmmm") AS txtMonth FROM tbl;
[/code]
Regards,
FishComment
- Month number
Comment