Tell me how to properly implement a sample of the database at a certain time?
The task is once a day at 7 am to choose a record per day
That is, in the database values:
03/05/2015 5:00:00
03/05/2015 6:00:00
03/05/2015 07:00:00 - for this time I must see all the testimony
03/05/2015 08:00:00
03/05/2015 9:00:00
03/06/2015 6:00:00
03/06/2015 07:00:00 - then these
03/06/2015 08:00:00
03/06/2015 9:00:00
How to build the right sample? Then you need to display one value in the textbox, and not the last one, namely, at 7 am: (That's how I tried to implement it
Select * From sut.diet where datatime = DateTime('now' 7 HOUR)
but it does not work.