如何禁用SQL到datetimepicker的假日日期 [英] How to disable holiday dates from SQL to datetimepicker
本文介绍了如何禁用SQL到datetimepicker的假日日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在sql表中的[假日日期]下存储了一组日期
i想在datetimepicker中禁用那些日子
我尝试了什么:
目前,我正在使用foreach循环从表中获取日期,并使用datimepicker_value将事件更改为diable日期。
i stored set of dates under [holiday dates] in sql table
i want to disable those days in datetimepicker
What I have tried:
currently, i am using foreach loop to get dates from table, and using datimepicker_value changed event to diable dates.
推荐答案
您没有提供其他表的名称,也没有提供列的名称,因此请在适用的地方替换。
You didn't provide the other table's name, nor the names of the columns, so substitute where applicable.
SELECT a.[my_date_column]
FROM dbo.[mytable] AS a
RIGHT JOIN dbo.[holiday_dates] AS b
ON CONVERT(DATE,a.[my_date_column]) <> CONVERT(DATE,b.[holiday_date]);
这篇关于如何禁用SQL到datetimepicker的假日日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文