Mahares,
you posted me a mini program for determining the day of the week in post #17.
Since I'm not that good at B4A yet, I tried to get a result by entering the date in Long to include year dates from 1980 if necessary.
Like I said, just trying out ignorance. Yes, your previous code works.
DateTime.DateFormat = "yyyy.MM.dd"
Dim MyQuery As String
Dim rs As ResultSet
MyQuery = $"SELECT Datum_zum_sortieren, strftime('%w', (DateTime.Date(Datum_zum_sortieren))) AS dday FROM Tankvorgang"$
rs=Main.SQL_DB.ExecQuery(MyQuery)
Do While rs.NextRow
Log(rs.getint("dday")) 'it will show 0, or 1, or 2, etc.
Loop