bbawa1-
I'm assuming you're quering SQL rather than a .NET data object. In either
case, give this a try:
SELECT ReceivedDate FROM Table1
WHERE ReceivedDate = GetDate() - 14
Since the base unit in SQL Server is day, the -14 should be just fine.
I suppose you could also get explicit with:
SELECT ReceivedDate FROM Table1
WHERE ReceivedDate = DATEADD(d, -14, GetDate())
The d parameter of DATEADD specifies you're working with days.
-dl
--
David R. Longnecker
http://blog.tiredstudent.com
> Hi,
>
[quoted text clipped - 5 lines]
> Select reveiveddate from table1
> where receiveddate = GetDate()-day(14)