Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x As DateTime = txtUser.Text If x.DayOfWeek() = 0 Then Response.Write("Sunday") End If End Sub