Format date in SELECT * query

后端 未结 5 1917
萌比男神i
萌比男神i 2020-12-17 20:25

Is it possible to format a date field in a SELECT * query? I want to get all of the columns from my table but need a different format from the date.

Something like:<

5条回答
  •  北海茫月
    2020-12-17 20:33

    If you are writing application containing different timezones and formats better practice will be using UNIX timestamp stored in int(8) field, otherwise you can format date fields in queries.

提交回复
热议问题