在本文中,GetDate()获得的日期由两部分组成,分别是今天的日期和当时的时间: Select GetDate() 用DateName()就可以获得相应的年、月、日,然后再把它们连接起来就可以了: Select Datename(year,GetDate())+'-'+Datename ...
在本文中,GetDate()获得的日期由两部分组成,分别是今天的日期和当时的时间: Select GetDate() 用DateName()就可以获得相应的年、月、日,然后再把它们连接起来就可以了: Select Datename(year,GetDate())+'-'+Datename ...
在本文中,GetDate()获得的日期由两部分组成,分别是今天的日期和当时的时间: Select GetDate() 用DateName()就可以获得相应的年、月、日,然后再把它们连接起来就可以了: Select Datename(year,GetDate())+'-'+Datename ...
最佳答案 如果这个日期格式是固定的话: var time = strTime.substring(0, strTime.indexOf(' '));这样就可以了。 其中indexOf(' ')表示第一个空格所在位置。请及时采纳!谢谢 ...
select convert(date,getdate()) ...
方法一: select CONVERT(varchar, getdate(), 120 ) 2004-09-12 11:06:08 select replace(replace(replace ...