I am trying to writing sql in sqlite3 but somehow it is not passing the result . I tried this :
select datetime ('2019-04-01 12:20',time('+2 hours'));
or
select time ('2019-04-01 12:20','+2 hours');
or
select date ('2019-04-01','YYYY-MM-DD HH:MM',time('+2 hours'));
any suggestions will be appreciated.
You should try to add minutes as following
select DATETIME('2019-04-01 12:20', '+120 minutes') as newTime;
or
select DATETIME('2019-04-01 12:20', '+2 hours') as newTime;
output:
| newTime |
| ------------------- |
| 2019-04-01 14:20:00 |