Re: vb.net date dayofweek
The. NET Framework makes it easy to order assigned day of the week for a certain date, and the localized weekday name for a certain date to show. The listed value on the day of the week points to a certain date answers are available from the possession or dayofweek. In contrast, the recovery of the weekday name of a formatting operation that can be executed by a formatting method, such as date and time value creation; ToString method or the method String.Format.
Re: vb.net date dayofweek
Syntax :
Code:
DayOfWeek variable = DateTime.Now.DayOfWeek;
string d1 = DateTime.Now.DayOfWeek.ToString();
Re: vb.net date dayofweek
See the code Below Hope this is Helpful......!
Code:
Module Module1
Sub Main()
Dim DayOfWeek As Integer
DayOfWeek = Now.DayOfWeek
Select Case DayOfWeek
Case 1
Console.WriteLine("Sunday")
Case 2
Console.WriteLine("Monday")
Case 3
Console.WriteLine("Tuesday")
Case 4
Console.WriteLine("Wednesday")
Case 5
Console.WriteLine("Thursday")
Case 6
Console.WriteLine("Friday")
Case 7
Console.WriteLine("Saturday")
End Select
End Sub
End Module