SELECT DATE_FORMAT('field_name', '%Y-%m-%d %H:%i:%s') FROM 'table_name'
Above SQL will format timestamp in "YYYY-MM-DD HH:MM:SS" format. If you require only date you can format timestamp as following SQL.
SELECT DATE_FORMAT('field_name', '%Y-%m-%d') FROM 'table_name'
No comments:
Post a Comment