August 18, 2003 at 12:16 pm
This is beyond me....
Look at the photo of my view please...
https://www.readysecure2.com/users/polajenkocom/images/combine.jpg
I want to get all records with a CreatedDate that is within the past 7 days. Can anyone help me do this?
Thanks
Alex Polajenko
Alex Polajenko
August 18, 2003 at 12:30 pm
SELECT
'Announcement'
, ItemID
, ModuleID
, CreatedByUser
, CreatedByDate
FROM Announcements
WHERE
DATEADD(d, 0, DATEDIFF(d, 0, CreateDate)) >= DATEADD(d, -7, DATEDIFF(d, 0, GETDATE())
UNION
SELECT
'Document'
, ItemID
, ModuleID
, CreatedByUser
, CreatedByDate
FROM Documents
WHERE
DATEADD(d, 0, DATEDIFF(d, 0, CreateDate)) >= DATEADD(d, -7, DATEDIFF(d, 0, GETDATE())
August 18, 2003 at 12:39 pm
Thank you very much sir..That did it.
Alex Polajenko
Alex Polajenko
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply