Results 1 to 8 of 8
  1. #1
    PhatRam32 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    11

    Access Query: Return Month Name and Year

    So one of my co-workers still is on access 2003 (long story) and trying to return month name and year. I gave her my function I use in 2010 version however it does not work on hers. Anything else she can try?



    Here is what I gave her..works on my end but not her 2003 version of access : format([date_field], "mmmm yyyy")

    Supposed to read as follows: (example) May 2013 for any date that falls in May.

    Thanks in advance for the help.

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    try this
    MonthName(Year(SomeDate))

    for this month use MonthName(Year(Date()))

    Dale

  3. #3
    PhatRam32 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    11
    SomeDate I am assuming is my date field.. i.e. MonthName(Year([DOB])) So if the date is 02/05/1982 it should return as: February 1982, correct?

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    YES, I hope I got the syntax correct.
    MonthName = name of the month
    Year= year of date

    Dale

  5. #5
    PhatRam32 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    11
    Will have her try it on her and will follow up. I tried it in 2010 just for the heck of it but it did not work and my guess is because its not supported in the newer versions of access.

  6. #6
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    I had the wrong syntax.
    try
    MyDOB: MonthName(Month([DOB])) & " " & Year([DOB])

    Dale

  7. #7
    PhatRam32 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    11
    Quote Originally Posted by rzw0wr View Post
    I had the wrong syntax.
    try
    MyDOB: MonthName(Month([DOB])) & " " & Year([DOB])

    Dale
    It works in 2010 I am keeping my fingers crossed it will work in 2003 version, I do not see why not based on some quick research I did just now. Many thanks and will keep you posted.

  8. #8
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Glad to help. Should work in 2003.

    Dale

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Month and Day only not Year to create query
    By ssalem in forum Queries
    Replies: 3
    Last Post: 02-28-2013, 02:37 PM
  2. Query / report per month and year
    By ripper in forum Queries
    Replies: 2
    Last Post: 10-24-2011, 07:51 AM
  3. Replies: 0
    Last Post: 03-25-2011, 02:37 PM
  4. by year by month
    By nkuebelbeck in forum Reports
    Replies: 21
    Last Post: 03-24-2010, 01:53 PM
  5. Replies: 0
    Last Post: 08-04-2009, 08:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums