If I understand you correctly, there are only two fields in your database (date and text).
Hope you read the USER QUERY SECTION comment in the script.
In this section, you can write your own query to interact with your table in the database.
// ---------------------------------------- USER QUERY SECTION ----------------------------------------
// --- You can write a query to your table.
// --- The output field names (alias) MUST BE "acdate" and "n".
// --- "acdate" - Date fields without time
// --- "n" - operation ( 0 - none, 1 - income, 2 - outcome, 3 - inc/outc ) This use for tablegrid colorize
// --- This subquery results is join with the generated dates to colorize the calendar by events.
// ----------------------------------------------------------------------------------------------------
QueryUsrTbl := '(SELECT '+
'DATE(Dt) AS acdate, '+
'CASE WHEN SUM(Inc)>0 AND SUM(Out)=0 THEN 1 WHEN SUM(Inc)=0 AND SUM(Out)>0 THEN 2 ELSE 3 END AS n '+
'FROM Account '+
'WHERE Inc <> 0 OR Out <> 0 GROUP BY 1 ORDER BY 1)';
For example, I changed the query. Now he works with the field "Dt" (date) and the field "Out" (expense).
At the output of the query, all dates where the expense field is not empty.
Underlined in red only.
QueryUsrTbl := '(SELECT '+
'DATE(Dt) AS acdate, '+
'2 AS n '+
'FROM Account '+
'WHERE Out <> '''' GROUP BY 1 ORDER BY 1)';