The following is another way of querying the max value for whatever column
maxId = sqlSelect("Records,@id:string","SELECT MAX(ideliveryId) FROM Neolane.Neolane.NmsrtEvent");
logInfo(maxId.Records.@id);
In your case, something like the following;
maxEventDate = sqlSelect("Event,@maxDate:string","SELECT MAX(tsEvent) FROM Neolane.Neolane.NmsbroadLogRcp");//replace neolane with your database name.schema
logInfo(maxEventDate.Event.@maxDate);
Depending on the amount of records in this table, it could take a while for the query to run. my db has more than 40m records in here.