0
Good evening, I’m having trouble putting in a date filter, I have a query where I bring the information of CD, Crane and Dtregistro (datetime) In this query I am already filtering the 24 hours between the current day and 24 hours before,
GRU_DT_REGISTRO between GETDATE()-1 and GETDATE()
In this Filter I try to set to bring me from the current date and time, the 24 hours before, but it brings data of 25 hours, ie 22:00 today until 22 hours yesterday, I would like you to display the previous 24 hours without counting the current Date, for example now are: 06/08/2017 22:15:00, so in my filter should have dates between 05/08/2017 22:00 & 06/08/2017 21:59:00 Can someone give me a hand:
I am using Sql Server 2014
Thanks @Leandroangelo didn’t even notice.
– Paulo Ricardo