如何使用日历控件中的日期在标签上显示工作日 [英] how to show weekday on label using date from calendar control

查看:432
本文介绍了如何使用日历控件中的日期在标签上显示工作日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想使用日历控件中的日期在标签控件上显示工作日.
怎么做.任何解决方案.

Hi,
I want to display weekday on label control using date from calender control.
How to do that. Any solution.

推荐答案

检查
Check this[^] out.
Once you have the DateTime value from the calendar control you just need to get the .DayOfWeek property (0-6) and convert it to a literal day. Apply that to your label and you are done.


这篇关于如何使用日历控件中的日期在标签上显示工作日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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