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

date total

Status
Not open for further replies.

hdat44

Technical User
Aug 15, 2002
50
GB
Help, how can i get the total number of records added into a database each day for a month, see example below?

Monday 01/01/200x 30
Tuesday 02/01/200x 27
Wednesday 03/01/200x 44
through to......
whatever 31/01/200x 56

?????
 
SELECT Format([yourDateField],'dddd dd/mm/yyyy'), Count(*) AS NumberOfRecords
FROM yourTable
GROUP BY Format([yourDateField],'dddd dd/mm/yyyy')

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi, thanks for your quick response. i copy & pasted your reply into sql view of my query and renamed the fields, i got half way there but it showed each record & not as a total
 
What are your actual table(s) structure, input sample and expected result ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Table: Transaction
Fields:
CustID Number
TransNo Autonumber -PK
Date Date/Time
Supplier Text

and i would like to be able to see how many transactions were entered per day each month
 
TRy

Code:
Select count(*),month([date]) As TranMonth,year([date]) TransYear
From Transaction
Group by year([date]),month([date])

BTW: Bad idea to name field Date
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top