Date Range In access 2000

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbjo827
    New Member
    • Sep 2008
    • 2

    Date Range In access 2000

    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?)
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, there.

    Field called month is redundant. Kill it to death.

    Kind regards,
    Fish

    Comment

    • bbjo827
      New Member
      • Sep 2008
      • 2

      #3
      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 FishVal
      Hi, there.

      Field called month is redundant. Kill it to death.

      Kind regards,
      Fish

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Originally posted by bbjo827
        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
        Ok.

        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,
        Fish

        Comment

        Working...