Date (1 Viewer)

Tkandy

Registered User.
Local time
Today, 14:24
Joined
Sep 21, 2009
Messages
13
I need to put a contol on a Db that makes sure there is a entry for every day.

I have [date] and [well reading] in the table.
 

Steve R.

Retired
Local time
Yesterday, 22:24
Joined
Jul 5, 2006
Messages
4,705
I assume you mean that data is entered every day, meaning 365 entries during the course of the year. If that is the case, sort the table/query by date declining. Use NOW() with the most recent date recorded with DATEDIFF function. If you get a number equal to or larger than 1, then you are missing dates.
 

John Big Booty

AWF VIP
Local time
Today, 12:24
Joined
Aug 29, 2005
Messages
8,263
I would suggest that you use the Date() function in preference to Now().

Date() will return the current date whilst Now() returns the current date along with the current time. So unless you specifically need a time component steer clear of Now() as the time component complicates the process of comparing dates.
 

Users who are viewing this thread

Top Bottom