Reputation: 569
Right now I'm trying to check a timestamp column, and find out if the schedule I'm looking at starts at midnight. I don't want to check the date portion.
So far I've tried a few things, but they are all similar to this.
SELECT * FROM schedule_summary
WHERE sche_START_TIME = TIME('00:00:00');
Upvotes: 1
Views: 3076
Reputation: 35323
time(Sche_START_TIME) = Time('00:00:00')
Convert both to time data types and compare them.
Though you need to be careful if timezones for either component could be different or if you need to account for variances in geographic location and times.
Upvotes: 1