Public Class Form1

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Dim TGL As Date
Dim sekarang As String
If TGL.DayOfWeek = 0 Then
sekarang = “Minggu”
ElseIf TGL.DayOfWeek = 1 Then
sekarang = “Senin”
ElseIf TGL.DayOfWeek = 2 Then
sekarang = “Selasa”
ElseIf TGL.DayOfWeek = 3 Then
sekarang = “Rabu”
ElseIf TGL.DayOfWeek = 4 Then
sekarang = “Kamis”
ElseIf TGL.DayOfWeek = 5 Then
sekarang = “Jumat”
Else
sekarang = “Sabtu”
End If
Label1.Text = sekarang & “,” & TGL.Day & “-” & TGL.Month & TGL.Year
MonthCalendar1.SetDate(TGL)
End Sub

Private Sub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker2.ValueChanged
Dim waktu As Date
Dim Saat As String
waktu = DateTimePicker2.Text
If waktu.Hour = 5 Then
Saat = “Sholat Subuh”
ElseIf waktu.Hour = 7 Then
Saat = “Sholat Dhuha”
ElseIf waktu.Hour = 12 Then
Saat = “Sholat Dzuhur”
ElseIf waktu.Hour = 16 Then
Saat = “Sholat Azhar”
ElseIf waktu.Hour = 18 Then
Saat = “Sholat Maghrib”
ElseIf waktu.Hour = 19 Then
Saat = “Sholat Isya”
ElseIf waktu.Hour = 1 Then
Saat = “Sholat Tahajud”
Else
Saat = ” ”
End If
Label2.Text = Saat

End Sub
End Class