I did have a chance to look at your project. It is hard to follow because a lot of it is in Spanish that I cannot make up. However:
If you change this line :
rs = Starter.SQL1.ExecQuery2(Query, Array As Object(lngDate))
to this line, you will not get the error and it works:
rs = Starter.SQL1.ExecQuery2(Query, Array As String(lngDate))
But your problem comes up later. Read on:
You store the date in the SQLite database table called 'protocol' as Datetime(now) in ticks which has the date and time components combined. Then, you use B4XDateTemplate to compare the calculated ticks from that date to the one stored in the database which is ticks. Both are different from each other, so you will never match any records in the table. If you change the date you store in the database when you INSERT from:
Dim mojDatum As Long=DateTime.Now
to:
Dim mojDatum As Long=DateTime.DateParse(DateTime.Date(DateTime.Now))
The date will be saved as ticks, but will not have the time component. This way you will be able to compare the date ticks from the calendar template to the stored date ticks in the table. I am not sure though if you wanted to change the way you store your dates. That is up to you. Maybe something later in the app will be affected and prevents you from going that route..