SQLite Date and Time Processing

I look at some basic date and time manipulations using SQLite, however the documentation is not very clear. All I want to do is add a few minutes that already exist on the same row in the database. I have a date and time, and then a duration. Therefore, I want to get the start date and time, as well as the end date and time. I looked at something in these lines:

I see you can use datetime, but you should specify "localtime", which does not seem to work.

Basically, I want the equivalent of DATEADD in SQL Server.

+5
source share
2 answers

Try

datetime(strftime('%s', start_date) + minute_count * 60,  'unixepoch')

start_date - your start date;

minute_count - the number of minutes as a whole.

+4
source

15 datetime.

SELECT datetime('now', '+15 Minute');
+16

All Articles