我想获取特定月份在sql server 2005中的天数 [英] I want to get number of days in a particular month in sql server 2005

查看:82
本文介绍了我想获取特定月份在sql server 2005中的天数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我想在sql server 2005中获得特定月份的天数.实际上我想为特定月份的员工准备薪水.我有月份和年份
如何使用月份和年份获取特定月份的天数

在此先感谢

Hi All

I want to get number of days in a particular month in sql server 2005 .Actually i want to prepare salary for employees in particular month..i have month and year
how to get count of days in a particular month using month and year

Thanks In Advance

推荐答案

它很简单

从table_name中选择COUNT(month),其中month =''"+ calender1.selectedmonth +"''和year =''"+ calender1.selectedyear +"''
SELECT COUNT(month) FROM table_name where month=''"+calender1.selectedmonth+"'' and year=''"+calender1.selectedyear+"''


这篇关于我想获取特定月份在sql server 2005中的天数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆