0

anyone know how to retrieve data from the database within the past 30 minutes. I tried solution such as DateTime >= DateADD(MINUTE,-30,GETDATE()) but does not help as after 30 minutes i still updating and also replacing the DateTime Column.

Fahmi
  • 37,315
  • 5
  • 22
  • 31

1 Answers1

0

Try below

select * from ablename where DateTime >= DateADD(MINUTE,-30,GETDATE()) and DateTime<getdate()
Fahmi
  • 37,315
  • 5
  • 22
  • 31