取当前的日期,精确到天

select convert(char(10),getdate(),120)  结果:2012-04-18

 

取当前的时间,精确到秒

select convert(char(10),getdate(),8) 结果:11:29:57 

或者select convert(char(10),getdate(),108) 结果一样

相关文章:

  • 2021-12-05
  • 2021-12-18
  • 2021-10-21
  • 2021-08-11
  • 2022-01-14
  • 2021-11-28
猜你喜欢
  • 2022-02-09
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案