比如:1 想格式化 000001,100 格式化为000100;

思路是这样的 1000000 +格式化的数字 取后6位:

select   right(cast(power(10,6) as varchar)+099,6)

 

//日期函数使用 DATEADD(day,3,GETDATE()) 

 

select [year]=year(getdate()),
[month]=month(getdate()),
[day]=day(getdate()),
[dayofweek]=datepart(weekday,getdate()),
[time]=datepart(hour,getdate()),
[minute] = datepart(minute,getdate()),
[Second] = datepart(Second,getdate()),
[Milliseconds] = datepart(Mi,getdate())

相关文章:

  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-11-28
  • 2022-12-23
猜你喜欢
  • 2021-10-13
  • 2021-07-17
  • 2021-06-03
  • 2022-12-23
  • 2022-03-10
  • 2022-12-23
相关资源
相似解决方案