开发者

How do I make mySQL timestamp field format using phpMyAdmin?

Can someone tell me how/where I go to make my timestamp field appear a certain way every time I create a new record.

SELECT DATE_FORMAT(new_ts, '%d/%m/%Y') FROM cartons_current

This works, but how do I make the field开发者_StackOverflow中文版 automatically do this with every new record?

How do I make mySQL timestamp field format using phpMyAdmin?


SELECT DATE_FORMAT doesn't change the format of the stored data at all, it just adjusts how MySQL gives you that data. You need to do DATE_FORMAT in any SELECT query against that table, or you can create a VIEW (essentially, a fake table using a SELECT query).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜