Recover data only from the previous day in a table in SQL Server

Viewed 384

I need to retrieve data from a table that has date referenced only the previous day, I am trying to do with the query below but I am not getting:

SELECT 
    Log.ValorEntrada, Log.DataHoraEvento, Log.NumeroEntrada 
FROM 
    Log 
WHERE 
    Log.DataHoraEvento = (GETDATE()-1)

How can I get this result?

4 Answers
Related