Tag Info

New answers tagged


You could use the function age() to simplify your expression (returns interval). But it's much more efficient to use a sargable expression to begin with. This operates with the exact time difference (current time is relevant): SELECT * FROM accounts WHERE status = 'PENDING_PAYMENT' AND status_updated_at < now() - interval '10 days' To operate ...


MySQL support a FROM_UNIXTIME(...) function :-) select FROM_UNIXTIME(1433433155) And the other way around, UNIX_TIMESTAMP Applying it to your example, assuming timecreated and timemodified are those Unix timestamps: SELECT category ,fullname ,shortname ,idnumber ,startdate ,visible , FROM_UNIXTIME (timecreated) ...

Top 50 recent answers are included