Is there a way to work out the time since a timestamp on a record purely using a MySQL query? So basically something like: TIMESINCE(record.timeupdated) as timeSinceUpdaye I’m passing the result straight to encodeJson() so don’t what to do the calculation in PHP. Thank!
Is there a way to work out the time since a timestamp on a
Share
Will return the number of seconds since the last update.
The legal values for
unitare as follows: MICROSECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR. Seetimestampdiff(unit,datetime_expr1,datetime_expr2)for details.