列出两个日期之间的星期日的所有日期 [英] List all dates of Sundays between two dates

查看:288
本文介绍了列出两个日期之间的星期日的所有日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii


我需要编写一个sql查询以列出两个日期之间的所有日期,其中day是特定的一天.
例如:我传递开始日期,结束日期,dayName1,dayName2
dayName可能是星期日,星期六等

请帮忙..

在此先感谢您

hii


i need to write a sql query to list all dates between two dates where day is a particular day .
For eg: I pass start date, end date, dayName1,dayName2
dayName may be Sunday,Saturday etc

Please help..

Thanks in advance

推荐答案

检查以下示例,该示例使用SQL Server列出了当年的所有周末:

http://www.sqlservercurry.com/2010/05/list-all-weekends-of-current-year-using.html [
check the following example, which Lists all the Weekends of the Current Year using SQL Server:

http://www.sqlservercurry.com/2010/05/list-all-weekends-of-current-year-using.html[^]

you can use this to get the particular day for a given date range.


这篇关于列出两个日期之间的星期日的所有日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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