How to subtract hours from a datetime in MySQL?
mySQL has DATE_SUB()
:
SELECT DATE_SUB(column, INTERVAL 3 HOUR)....
but would it not be better to try and sort out the underlying time zone issue instead?
Assuming you have some timezone issue and know source and destination timezone, you could convert it like so
SELECT DATE_FORMAT(CONVERT_TZ(x.date_entered, 'UTC', 'Europe/Berlin'),
'%Y-%m-%d') AS date
FROM x ORDER BY date ASC;