我怎么能知道这一天是星期六还是星期天? [英] How can I figure out if the day is saturday or sunday?
本文介绍了我怎么能知道这一天是星期六还是星期天?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个vb.net程序,只能在工作日运行。
现在我想添加逻辑来判断这一天是周六还是周日。如果它只是显示一条消息说在预定时间外运行。
我该怎么做?
我试过的:
我已经完成了一个程序,但我需要帮助确定这一天是周六还是周日。
I have a vb.net procedure that should only run on weekdays.
Now I would like to add logic to figure out if the day is Saturday or Sunday. If it is just display a message say running outside scheduled time.
How do I do this?
What I have tried:
I have a procedure done but I need help figuring out if the day is Saturday or Sunday.
推荐答案
这应该这样做:
https://msdn.microsoft.com/de-de/library/system.datetime.dayofweek(v = vs.110).aspx [ ^ ]
通过这样做可以找到
:
https://www.google.ch/#q=vb.net+dayofweek [ ^ ]
希望有所帮助。
This should do it:
https://msdn.microsoft.com/de-de/library/system.datetime.dayofweek(v=vs.110).aspx[^]
found by doing this:
https://www.google.ch/#q=vb.net+dayofweek[^]
Hope it helps.
这篇关于我怎么能知道这一天是星期六还是星期天?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文