Hi,
I am traing to convert datatime to data an applying it in where statement:
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate )) = ({ fn CURDATE() })
Now I have to modify it for
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate + 1 )) = ({ fn CURDATE() })
OR to get
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate )) = ({ fn CURDATE() }- 1)
First statement is working, but second and third is not.
How to get records with yesterday CaseCloseDate?
CaseCloseDate id datatime type.
Please help if you can
Marta
I am traing to convert datatime to data an applying it in where statement:
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate )) = ({ fn CURDATE() })
Now I have to modify it for
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate + 1 )) = ({ fn CURDATE() })
OR to get
WHERE DATEADD(d, 0, DATEDIFF(d, 0, CaseCloseDate )) = ({ fn CURDATE() }- 1)
First statement is working, but second and third is not.
How to get records with yesterday CaseCloseDate?
CaseCloseDate id datatime type.
Please help if you can
Marta