lemonzwt

获取当前时间戳

select unix_timestamp();

select unix_timestamp(now());

获取当前时间

select now();

时间转时间戳

select unix_timestamp(\'2019-01-15 09:45:16\');

时间戳转时间

select from_unixtime(1573053179);

时间戳格式化

SELECT from_unixtime(1573053179, \'%Y-%m-%d %H:%i:%S\');

时间格式化

select date_format(now(), \'%Y-%m-%d\');
select date_format(\'2019-09-15 09:45:16\', \'%Y-%m-%d\');

 

分类:

技术点:

相关文章:

  • 2021-10-13
  • 2021-12-10
  • 2021-08-06
  • 2021-09-29
  • 2021-12-10
  • 2021-12-10
  • 2021-12-05
  • 2021-11-28
猜你喜欢
  • 2021-12-05
  • 2021-11-29
  • 2021-11-19
  • 2021-11-19
  • 2021-11-19
  • 2021-10-03
  • 2021-11-19
相关资源
相似解决方案