Query help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KathyB
    New Member
    • Oct 2006
    • 4

    #1

    Query help

    I have a column with expiration dates (in a ## / ## / ## format). I'd like to query those dates by month. Any ideas how to set up the criteria?

    Thanks,
    Kathy
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    To get the month value of a date

    Month(DateField Name)

    Returns 1 for January etc...


    Originally posted by KathyB
    I have a column with expiration dates (in a ## / ## / ## format). I'd like to query those dates by month. Any ideas how to set up the criteria?

    Thanks,
    Kathy

    Comment

    • KathyB
      New Member
      • Oct 2006
      • 4

      #3
      I'm getting an Invalid Syntax message.

      I'm entering Month(ChangeOut Date) in the criteria row for that same column.

      Comment

      • KathyB
        New Member
        • Oct 2006
        • 4

        #4
        I have entries in the ChangeOutDate column in a ## / ## / ## format. I'd like the user to be able to query all items expiring in November.

        Maybe this example will help.

        thanks again,
        Kathy

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          Don't put it in the criteria section.

          Create a new column

          MonthNo: Month([ChangeOutDate])

          You can then set the criteria on this column to:

          1 (This will return all records for January)
          2 (This will return all records for February)
          etc...


          Originally posted by KathyB
          I'm getting an Invalid Syntax message.

          I'm entering Month(ChangeOut Date) in the criteria row for that same column.

          Comment

          • KathyB
            New Member
            • Oct 2006
            • 4

            #6
            Got it!

            Thanks so much.

            Kathy

            Comment

            Working...