mysql query timestamp format


Rubbing time format
SELECT ID, name, FROM_UNIXTIME (Time, '% Y-M-% D%% H:% I:% S') from AS AddTime TestTable WHERE totalTime = '';!

// is the timestamp field Time , after check out formatted data, rename addtime

When the query time can become a time stamp format

select id, name, UNIX_TIMESTAMP (time) as addtime from testtable1; // my time inventory data format is this: 2019-02-27

 

Every time you use the find can not find, or save to your essay. . .

Source: https://www.cnblogs.com/xbxxf/p/11114426.html

Guess you like

Origin www.cnblogs.com/shaoyang0123/p/11806986.html