Reputation: 499
i simply have two fields. dtStartTime and dtStartDate.
I want to do a query now which returns one combined field dtStart using SQLite
I have tried SELECT (dtStartDate+dtStartTime) as dtStart1, from ... but it returns wrong values...
Thank you, shorty
PS: Dates are stored as unixepoch
Upvotes: 2
Views: 3223
Reputation: 32094
SELECT datetime(d, t)
FROM (
SELECT date('now') as d, time('now') as t) as dt;
Upvotes: 3
Reputation: 6591
probably:
SELECT DATETIME(DATE(dtStartDate) || ' ' || TIME(dtStartTime)) FROM YourTable;
Upvotes: 0