0
I have a query below that I need to bring inside the case only when the field Tarvencimento is less than today’s date (so far I managed to do), however, only when today’s date is 5° day after the expiration date.
Example: A task number 11111 was won on 10/11/2017 and today is 22/11/2017 so it was not to bring this task, it was only to bring today’s date from 11/11 to 15/11.
SELECT
CASE WHEN T.TarVencimento < getdate() THEN CAST(datediff(day,TarVencimento,getdate()) AS VARCHAR) ELSE '0' END +' (TEMPO)'
FROM Tarefa T
That way it didn’t work @Will Palaro.
– Renan Bessa
What does it take? It was a mistake? It’s bringing more or less day?
– Will Palaro