SQLServer取⽇期时只要年⽉或年⽉⽇select CONVERT(varchar(7) ,getdate(), 120) as 'Date' from 表名;--只取年⽉且⽇期格式为 xxxx-xx
select CONVERT(varchar(12) ,getdate(), 120) as 'Date' from 表名;--只取年⽉⽇且⽇期格式为 xxxx-xx-xx
⽇期格式对照:
郑爽张恒最新消息101 xx/xx/xxxx(Month/Date/Year)
郎平前夫102 (Year.Month.Date)郑州广告材料市场
103 xx/xx/xxxx(Date/Month/Year)
汪雨什么来头刘岩受伤104 (Date.Month.Year)
105 xx-xx-xxxx(Date-Month-Year)
106 xx xx xxxx(Date Month Year)
107 xx xx,xxxx(Date Month,Year)
个性网名男生111 xxxx/xx/xx(Year/Month/Date)
112 xxxxxxxx(YearMonthDate)
120 xxxx-xx-xx(Year-Month-Date)
..........
发布评论