I have the date column with the data type DATE
; I have stored data from 2018-01-01 00:00:00.0
to this date.
At the time of making a query I would like to know how I do it so that it shows me only the data of the current date.
If I use the getdate()
it does not show me any data because it looks for the date and time of the system.
This is the query I have:
select * from SGT_VIST_PRUEBA where TERMINAL='TTQ' AND FECHA=GETDATE() ORDER BY FECHA DESC