获取数据库日期格式字段的年月日的值

select dd.dueDate from toyo.DealDetails dd where dd.DealId='76c373a8-5d7d-42a0-901f-163b07686794' and dd.DetailNo=1
select year(dd.dueDate),month(dd.DueDate),day(dd.DueDate) from toyo.DealDetails dd where dd.DealId='76c373a8-5d7d-42a0-901f-163b07686794' and dd.DetailNo=1
select convert(varchar(6),dd.dueDate,112) from toyo.DealDetails dd where dd.DealId='76c373a8-5d7d-42a0-901f-163b07686794' and dd.DetailNo=1
select convert(varchar(6),dd.dueDate,112) from toyo.DealDetails dd where dd.DealId='76c373a8-5d7d-42a0-901f-163b07686794'

 

posted on 2017-03-17 10:49  水碧  阅读(467)  评论(0编辑  收藏  举报

导航