Re: Nearest max date before a specified one
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 18 Jun 2005 15:28:25 -0500
SELECT Top 1 dEntryDate
FROM R tblDates
WHERE dEntryDate<CDate('1.1.2005')
ORDER BY dEntryDate Desc;
--
Duane Hookom
MS Access MVP
"Frank" <frank673@xxxxxxxxxxx> wrote in message
news:Oq%23S59DdFHA.612@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I am trying to create an SQL statement which would return to me the
> maximum date before a specified date. I was able to get a list of records
> with dates prior to the one I enter but not the last one. Can anyone help?
> Thanks.
>
> SELECT tblDates.dEntryDate
> FROM R tblDates
> WHERE (((tblDates.dEntryDate)<CDate('1.1.2005')));
>
> Frank
>
>
>
.
- References:
- Nearest max date before a specified one
- From: Frank
- Nearest max date before a specified one
- Prev by Date: Data type mismatch in criteria expression
- Next by Date: Nearest max date before a specified one
- Previous by thread: Nearest max date before a specified one
- Next by thread: Re: Nearest max date before a specified one
- Index(es):
Relevant Pages
|