I have a device that generates logs into a database.
I need to query the database
Query1 = give me all the records and columns from TODAY from table01
Query2 = give me all the records and columns from YESTERDAY from table01
The problem I am having is that the date field is not exactly in a nice mm-dd-yyyy
format.
Fields are:
datetime, device, controlnumber, result
the datetime field outputs data that looks like this yyyy-mm-ddTHH:MM:SS
(not sure why there is a T
except maybe its just plainly saying this is the time):
2018-07-16T13:34:00
2018-07-16T18:15:00
2018-07-16T18:33:00
2018-07-16T18:50:00
2018-07-16T19:02:00
Can anyone help me through a quick (i know this is not right):
select * from table01
where datetime = Today()
and datetime = Yesterday()
Order by controlnumber