Das liegt daran, dass SQLite die Daten als Text ablegt. Du musst für den Vergleich daher für ein passendes Format sorgen:
Code:
SELECT Id, EntryDate, EntryTime
FROM Tm_TimeRawData
WHERE EntryDate = '2025-02-23'
AND strftime('%H:%M:%S', EntryTime) = '11:49:00';
Alternativ geht es mit LIKE:
Code:
SELECT Id, EntryDate, EntryTime
FROM Tm_TimeRawData
WHERE EntryDate = '2025-02-23'
AND EntryTime LIKE '11:49:00%';
Das habe ich hier online getestet:
https://sqliteonline.com/
Zur vorherigen Erstellung der
DB habe ich dies verwendet:
Code:
CREATE TABLE Tm_TimeRawData (
Id INTEGER PRIMARY KEY AUTOINCREMENT,
EntryDate DATE,
EntryTime TIME
);
INSERT INTO Tm_TimeRawData (EntryDate, EntryTime) VALUES
('2025-02-23', '10:51:00.000'),
('2025-02-23', '11:49:00.000'),
('2025-02-23', '12:23:00.000');