Latest records date and count

Find how many items in table, with column DateAdded is the latest DateAdded in that column
Converting that column from DateTime to Date so we can find count per day
For each Year.
SQL worked for db.xlsx (Access mdb usually)

CodeFunctionName
What is this?

Public

Tested

Original Work
Find how many items in table, with column DateAdded is the latest DateAdded in that column
    Converting that column from DateTime to Date so we can find count per day
    For each Year
Allow developer to have output to user as ...
    16 Legsh(s) added Tuesday, October 24, 2023
After getting the count and the date for that count.

SQL worked for db.xlsx (Access mdb usually)

This is SQL template, means developer needs to replace {$Year$} with proper condition before running.



sQUpdates    = "Select Count(*) as Coco, DateValue([DateAdded]) As DateAdded From [Legsh$] Where Year = '{$Year$}' And " & _
            "DateValue([DateAdded]) = (Select Top 1 DateValue([DateAdded]) from [Legsh$] Where Year = '{$Year$}' Order By [DateAdded] Desc, FileName Asc) " & _
            "Group by DateValue([DateAdded]); "

Views 185

Downloads 80

CodeID
DB ID

ANmarAmdeen
635
Attachments
Revisions

v1.0

Thursday
November
2
2023