month thing based on an earlier post. My bad.
<http://intranet>
Stephen E. Schuster
PeopleSoft Administrator
2000 Ashland Drive
Ashland, KY 41101
Office Phone 606.920.7447
Cell Phone 606.831.4590
-----Original Message-----
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 1:36 PM
To: CF-Talk
Subject: RE: SQL: Selecting Max Date Entries
It makes sense because I want all entries in the month no matter the
time. If there where no entries for a month I don't want the site to
display "no entries", I want it to display the entries for last month
that has entries. That way there will always be entries shown.
The below works.
SELECT *
FROM tbl_entries
WHERE (MONTH(postDateTime) =
(SELECT month(MAX(postdatetime))
FROM tbl_entries)) AND
(YEAR(postDateTime) =
(SELECT year(MAX(postdatetime))
FROM tbl_entries))
-----Original Message-----
From: Schuster, Steven [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 1:34 PM
To: CF-Talk
Subject: RE: SQL: Selecting Max Date Entries
MAX of a date field to ignore time, why would you want it to do this?
That would be tricky, I guess you could trunc the date field or
something,
or use the format command.
But wouldn't you want the time piece in the comparison since 10/12/2004
at 3
PM is before 10/12/2004 at 5 PM? Excuse the stupid question just trying
to
understand...
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

