+ 1
Using LIKE to select Timestamp
Hi all! I'm pretty new to SQL and am trying to figure out a timestamp issue. There's probably a simple answer, so hopefully you all can help! I'm using a database that includes a column of timestamps. I want to see only the objects with today's timestamp. Whenever I try to do the following: SELECT * from databasename where Timestamp like '2018-09-04%'; nothing is returned. I know that this database contains objects with a timestamp from today under the Timestamp column because I've checked multiple times. Any idea what I'm missing?
1 ответ
0
Try '2018-09-0%' or Timestamp='2018-09-04'