mysql date函數(shù)怎么用
mysql date函數(shù)怎么用?
慕桂英4014372
2018-11-23 23:15:20
TA貢獻1829條經(jīng)驗 獲得超4個贊
mysql date函數(shù)怎么用
獲得當前日期+時間(date + time)函數(shù):now()
除了 now() 函數(shù)能獲得當前的日期時間外,MySQL 中還有下面的函數(shù):
current_timestamp() current_timestamp
localtime() localtime
localtimestamp() localtimestamp
這些日期時間函數(shù),都等同于 now()。鑒于 now() 函數(shù)簡短易記,建議總是使用 now() 來替代上面列出的函數(shù)。
舉報