Thanks I'll try that. Ultimately trying to highlight the list line that corresponds to the present time , calc the present time and match to the closest date between now and the unit increment. The order doesn't really matter as the map was used to find the line number of the schedule list to highlight.
So the key used was a date which results in a runtime error ;
var st = Date();//existing time
var start = st.format("yyyy-MM-dd hh:mm:ss ZZZ", "TimeZone.system");
var ed = st.dateByAddingMinutes(15);
var finish = ed.format("yyyy-MM-dd hh:mm:ss ZZZ", "TimeZone.system");
Label3.text = ed.format("yyyy-MM-dd hh:mm:ss ZZZ", "TimeZone.system");
PostgreSQL1.connect
var sql = 'SELECT * FROM"Calendar_Appointment" WHERE "resource_id" = 2 AND "date" >= $$\(start)$$ AND "date" <= $$\(finish)$$';
var rs = PostgreSQL1.select(sql);
Console.write(PostgreSQL1.errorMessage);
TableView2.dataSet = rs;
//match Date
var d = rs.date;
var dd = Date(d,"yyyy-MM-dd hh:mm:ss ZZZ", "TimeZone.system");
Console.write(rs.date); // ok gives date/time now 2019-08-28 08:15:00
var line = Window1.mappy[dd]; // runtime error
//Runtime Error
//Unable to perform operator LOADAT on object
A list is generated with a single row - dd - but I can't see away to match it to the list in Table1 other than map