更新时间:2023-01-28 21:17:38
选择日期名称(dw,''25nov2011'')
select datename(dw,''25nov2011'')
在查询中可以使用datename()
方法
In query you can usedatename()
method
string selectSQL = "select UPPER(name) as name,userid,day(dob) as da,DATENAME(month,dob) as mn,Designation,Deptt from empbirth where day (dob-1)= datepart(day, getdate()) AND month(dob)= datepart(month, getdate()) or day (dob-2)= datepart(day, getdate()) AND month(dob)= datepart(month, getdate())";