+ 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?

5th Sep 2018, 3:14 AM
Hannah Carson
Hannah Carson - avatar
1 Odpowiedź
0
Try '2018-09-0%' or Timestamp='2018-09-04'
5th Sep 2018, 3:59 AM
wando br
wando br - avatar