-
datetime calculations
I am trying to do a calculation to find rows which have a date which is 2 days older the the getdate().
i.e Select documentdate from table where documentdate < (getdate() - 2)
Any ideas on how I can perform this operation.
Thanks
Vinny
-
datetime calculations (reply)
Hi Vincent
You can browse within DATEs by using DATEADD
i.e.:
Select documentdate
from table
where > documentdate
AND < DATEADD(DD, -2, getdate())
I hope that helps
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|