Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In a query change from month integer to month name

Status
Not open for further replies.

Radman

Programmer
Jan 20, 2000
22
AU
Hi,<br>&nbsp;&nbsp;&nbsp;I am producing a graph which uses a date. On the graph i have the x-axis as the months of the year (a.k.a date). The months are extracted from the date field using <br><br>Month: Month(C.[Date Received])<br><br>The months are extracted as a number, but is there any way for me to extract then as the months name instead, over to convert the month number to a name before the query draws the graph. <br><br>thanks Radman
 
The Format function might do the trick.<br><br>dtMonth=format([Date Received], &quot;mmm&quot;) <br><br>should provide the right result, although I seem to have problems with it using local regional settings. I therfore use the following:<br><br>dtMonth=Mid$(Format([Date Received], , &quot;long date&quot;), 5, Len(Format([Date Received], , &quot;long date&quot;)) - 8)<br><br>These are VBA-code examples, but both the format- and the mid$ function is available in queries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top