' This (in Sub Activity_Create) puts the name of current day on Label5.
thanks to: http://www.b4x.com/android/forum/threads/getdayofmonth.15104/
' Edited
The rest of Sub nex_Click using variable i does step through the 3 records in the database using a nex and a previous button..
How would I get Label5 to show the day name changes as the dB changes? :bangs head:
B4X:
Dim WeekDaysStr() As String
WeekDaysStr = Array As String ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
Label5.text= WeekDaysStr(DateTime.GetDayOfWeek(DateTime.Now) - 1)
B4X:
Sub nex_Click
Dim WeekDaysStr() As String
WeekDaysStr = Array As String ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
' This on nex_Click changes day name on Label5 randomly when used with the Previous_Click button
dadate.text= WeekDaysStr(DateTime.GetDayOfWeek(DateTime.Now) - i)
' This on nex_Click changes day name to a number
' dadate.text= DateTime.GetDayOfWeek(DateTime.Now) - 1
The rest of Sub nex_Click using variable i does step through the 3 records in the database using a nex and a previous button..
B4X:
'Log ("B4 If " & (i))
If i <= 1 Then
i = i + 1
End If
Cursor1 = SQL1.ExecQuery("SELECT * FROM Names")
Cursor1.Position = i 'example location3 'set the cursor
EditText1.Text = Cursor1.GetString("First name") 'read the value of the FirstName column
EditText2.Text = Cursor1.GetString("Name") 'read the value of the LasstName column
Cursor1.Close
Log ("AFTER If " & (i))
End Sub
How would I get Label5 to show the day name changes as the dB changes? :bangs head: