Finding the date of monday in a week with VB.NET

前端 未结 10 1610
故里飘歌
故里飘歌 2020-12-16 12:37

I need to find a way to find the date (DD/MM/YYYY) of the Monday for any week we\'re on.

For example, for this week, monday would be 09/11/2009, and if this were nex

10条回答
  •  一个人的身影
    2020-12-16 13:11

    There is a day of week method that you can use

    Dim instance As DateTime
    Dim value As DayOfWeek
    
    value = instance.DayOfWeek
    

    see: http://msdn.microsoft.com/en-us/library/system.datetime.dayofweek.aspx

提交回复
热议问题