+ Reply to Thread
Results 1 to 5 of 5

Query with Date/Time field to Month

  1. #1
    Registered User
    Join Date
    10-24-2011
    Location
    Pensacola, Florida
    MS-Off Ver
    Excel 2007
    Posts
    15

    Question Query with Date/Time field to Month

    Access 2007
    Existing Data Base:
    In performing a Query of a data base that has a field that is Date/Time set to Medium Date, this field has dates that cover multiple years and all months of the year. The field needs to be set to Medium Date to comply with other reports that are required to do.

    Problem:
    In using this field, how do I separate out only the January or June or December month for a report [having multiple years is no a problem]?
    In using this field, how do I separate out a month of a specific year {ex: January, 2009 or May, 2008}?

    I want to Thank each individual that responds in advance for their help with this problem.
    Last edited by Autin; 12-07-2011 at 03:25 PM.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Query with Date/Time field to Month

    To select all records in a certain month:
    Please Login or Register  to view this content.
    # will be the number of the month (1 for Jan, 2 for Feb, etc.)
    To select all records in a certain month and a certain year:
    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    10-24-2011
    Location
    Pensacola, Florida
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Query with Date/Time field to Month

    davegugg

    Thanks for the information

    Only question is where do I place the query code that you described?

    many thanks

  4. #4
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Query with Date/Time field to Month

    I assumed you had an existing query set up. If not, you'll have to create a new one.

  5. #5
    Registered User
    Join Date
    10-24-2011
    Location
    Pensacola, Florida
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Query with Date/Time field to Month

    davegugg

    I got it to work.

    I want to THANK YOU in advance for your assistance with this problem.

    Autin
    Attached Images Attached Images
    Last edited by Autin; 12-10-2011 at 01:35 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1