Reputation: 13
I am using this to get the response time
GREATEST(0, TIMESTAMPDIFF(SECOND, createdAt, replied_at)) AS response_time,
But its showing NULL,
Given that createdAt and replied_at is in UNIX timestamp createdAt, repliedAt and response_time all are BIGINT I want the response time which is the difference of replied_at minus createdAt in seconds
Upvotes: -1
Views: 43
Reputation: 5
The 2nd and 3rd fields in TIMESTAMPDIFF() function should not be in UNIX time. Refer this article: TIMESTAMPDIFF() usage
Upvotes: -1