If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > How to Get MonthName in Excel Query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-06, 07:54
rakeshprkh rakeshprkh is offline
Registered User
 
Join Date: May 2006
Posts: 20
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
Reply With Quote
  #2 (permalink)  
Old 07-13-06, 03:21
Fazza Fazza is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 07-13-06, 04:17
rakeshprkh rakeshprkh is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 07-13-06, 05:03
Fazza Fazza is offline
Registered User
 
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.......
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On