ITBenelux
asked on
Access ADP - Date function today
Experts,
I have a query in my Access ADP project where I want to check a series of dates who are in the future (including if they match today). I can not use now() or getdate() as they will look at the time as well.
If found a T-SQL function, to be able to check on the date only.. but it still does not work
When I use : WHERE dbo.UserId.Date_removed >= GetDate() the query returns all future dates, but not the one who match today.
thx
I have a query in my Access ADP project where I want to check a series of dates who are in the future (including if they match today). I can not use now() or getdate() as they will look at the time as well.
If found a T-SQL function, to be able to check on the date only.. but it still does not work
When I use : WHERE dbo.UserId.Date_removed >= GetDate() the query returns all future dates, but not the one who match today.
thx
SELECT dbo.UserId.Date_removed FROM dbo.UserId INNER JOIN
dbo.Department ON dbo.UserId.Department = dbo.Department.dep_id
WHERE dbo.UserId.Date_removed >=
(SELECT DATEADD(dd, DATEDIFF(dd, 0, GetDate()), 0)
In Access the date() function should return todays date.
How about:
WHERE dbo.UserId.Date_removed >= INT(GetDate())
or:
WHERE DATEDIFF(dd, dbo.UserId.Date_removed, GetDate()) >= 0
/gustav
WHERE dbo.UserId.Date_removed >= INT(GetDate())
or:
WHERE DATEDIFF(dd, dbo.UserId.Date_removed, GetDate()) >= 0
/gustav
WHERE ((CONVERT(VARCHAR(6), dbo.UserId.Date_removed, 112) >= ((CONVERT(VARCHAR(6), GetDate(), 112)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tested all proposed solutions.. yours worked ... thx
SELECT Date_removed
FROM dbo.UserId
WHERE Date_removed >= DATEADD(dd,DATEDIFF(dd,0,G
AND Department IS NOT NULL