A little late, but MySQL has a command for that:
Then in pythonWhich will give you the difference in minutes.
That's assuming that your table column datatype is TIMESTAMP, which it naturally should be.
Code:
create table test (log_time timestamp default current_timestamp());insert into test (log_time) values(default);select log_time,unix_timestamp(log_time) from test limit 1Code:
from time import timestamp=res[0]unix=res[1]now=time()print(int(now-unix)/60)That's assuming that your table column datatype is TIMESTAMP, which it naturally should be.
Statistics: Posted by valkyrie44 — Tue Dec 23, 2025 5:54 pm