i want to seach and display current date no of record from database.
how to find no of records for current date using sql.
i tried as below but it return me total no of records i want current date records from db.
select count(*) from Table.
i want to seach and display current date no of record from database.
how to find no of records for current date using sql.
i tried as below but it return me total no of records i want current date records from db.
select count(*) from Table.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek SainiRank #202 · 11.9K reputationPosted Apr 1, 2022, 2:21 AM EDT
SELECT COUNT(*) FROM
mytable
WHERE 'myfkid' = 1112 and datecolumnnamecreated, '%d-%m-%Y') = curdate();
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Apr 2, 2022, 2:19 PM EDT
Naresh BeniwalRank #365 · 6.8K reputationPosted Nov 6, 2022, 11:09 PM EST
https://stackoverflow.com/questions/9229862/how-to-count-number-of-records-per-day
Sachin SinghRank #66 · 26.2K reputationPosted Nov 7, 2022, 2:44 AM EST
Don't you have any date/datetime column?
Jignesh KumarRank #91 · 22.9K reputationPosted Nov 7, 2022, 7:21 AM EST
Hi Bhavesh,
You can achieve this if you have date column in your table, If you have date column then try this one,
SELECT COUNT (ColumnNameTocount) as Total FROM YourTableName where CAST(YourDateCoumn AS DATE) = CAST(GETDATE()AS DATE)