Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    20

    Unanswered: How to Get MonthName in Excel Query

    Dear Sir,

    I am using a date field in Microsoft Query in Excel 2003.
    I want the query to return MonthName instead of date. the
    Query is: Select MonthName(Order_Date) as Date from ORDERS. I
    have also tried CMonth Function but I am not able to return
    only the MonthName from date value. Function Month() works but it
    gives month in numbers like 1,2 3 but I want in Jan, Feb, Mar etc.
    Can you please help. Where can I see list of functions supported by
    Microsoft Query.

    Thanks,
    Rakesh

  2. #2
    Join Date
    Feb 2006
    Posts
    113
    Rakesh,

    I think you can use VBA functions in the SQL. So,
    Code:
    SELECT Format(Order_Date, 'mmm') AS [MyDate]
    HTH
    Fazza

  3. #3
    Join Date
    May 2006
    Posts
    20
    Hi,

    Thanks a lot. It works. One more question. From where do I know which Functions works with Microsoft Query and which note. Or is it so that all
    VBA functions work with MS Query? Is they any reference to site?

    Thanks again,
    Rakesh

  4. #4
    Join Date
    Feb 2006
    Posts
    113
    I don't know, Rakesh. Just have a go and see what happens. I think VBA functions work in SQL but I have no definitive reference and haven't done any serious testing. Whatever I've needed has always been possible, one way or another.......

Posting Permissions

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