PostgreSQL将日期转为年、月、日的函数date_trunc:

  当前年:  select  date_trunc('year',now())

  当前月:  select  date_trunc('month',now())

  当前日:  select  date_trunc('day',now())

  当前时:  select  date_trunc('hour',now())

  当前分:  select  date_trunc('minute',now())

  当前秒:  select  date_trunc('second',now())

相关文章:

  • 2021-09-22
  • 2022-12-23
  • 2022-02-02
  • 2021-12-29
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案