0

I have a table:

CREATE TABLE "date" (
    "datetime" TEXT,
    PRIMARY KEY("datetime")
);

and rows:

datetime
--------
2019-02-01 01:30+03:00
2019-02-01 02:30:10-03:00
...

For example, my timezone is +01:00

How can I select date and time without timezone?

SELECT 
   ??? as "date", 
   ??? as "time", 
   ??? as "timezone", 
   datetime("datetime", "+01:00") as "local"
FROM "date";
date       | time     | timezone | local
-----------|----------|----------|--------------------
2019-02-01 | 01:30:00 | +03:00   | 2019-01-31 23:30:00
2019-02-01 | 02:30:10 | -03:00   | 2019-02-01 06:30:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.