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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Month as Apr instead of 04

Status
Not open for further replies.

netrusher

Technical User
Joined
Feb 13, 2005
Messages
952
Location
US
Below is the SQL for my query. The results will show month
year in a column that looks like: 03 2008. Is there
anyway for this to show as Mar 2008 instead. This
month is achieved by selecting a date range on a calendar
on the form. If the first date is 3/1/2008 and the last
date is 04/29/2008 then the query will show as:

03 2008
04 2008

I would like for it to show as:
Mar 2008
Apr 2008

Can anyone tell me how to do this?

Code:
SELECT 
Format([TruckDate],'mm yyyy') AS [Month Year], 
Count(*) AS TruckTotals
FROM TruckRegisterTbl
WHERE 
(((TruckRegisterTbl.Company) Is Not Null) 
AND ((TruckRegisterTbl.TruckDate) Between [Forms]![VisualInformationForm]![StartDateTxt] And [Forms]![VisualInformationForm]![EndDateTxt]))
GROUP BY 
Format([TruckDate],'mm yyyy');
 
I found out all I have to do is add a 3rd m.
 



Hi,

You had better be careful about your date statement...
Code:
((TruckRegisterTbl.TruckDate) Between [Forms]![VisualInformationForm]![StartDateTxt] And [Forms]![VisualInformationForm]![EndDateTxt]))
are these ALL real dates or are some strings?

Skip,

[glasses]Just got a nuance...
to replace the old subtlety![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top