Hi community I'm having problems with dateutils. I am trying to execute a command on a set day, but the command sometimes gets executed and sometimes it doesn't. It appears that the if does not run or does not read the exact day. Any help?
CODE:
Dim day As String
day=DateUtils.GetDayOfWeekName(DateTime.Now)
Log("Giorno :"&day)
Lista_Pizza.Clear
If day ="Dienstag" Or day ="Martedi" Or day= "Tuesday" Then
C= s4.ExecQuery("SELECT Nome,PrezzoPizzaTag,Descrizione FROM MenuPizze")
Else
C= s4.ExecQuery("SELECT Nome,Prezzo,Descrizione FROM MenuPizze")
End If
If C.RowCount>-1 Then
For i = 0 To C.RowCount - 1
C.Position = i
Lista_Pizza.Add(C.GetString("Nome"))
Lista_Pizza_Desc.Add(C.GetString("Descrizione"))
If day ="Dienstag" Or day ="Martedi" Or day= "Tuesday" Then
Lista_Prezzo_Pizza.Add(C.GetDouble("PrezzoPizzaTag"))
PizzaTag=1
Else
Lista_Prezzo_Pizza.Add(C.GetDouble("Prezzo"))
End If
Next
C.Close
End If