Postprocessing SQL-request lazarus / 16-Databases ---------------------------------------------------------------------- Vodnik · 2018-03-02 20:41 Hi, I'm using Lazarus 1.8.0 / FPC 3.0.4 to access Informix DB via ODBC driver. DB contain records about telephone calls, I'm building specialized reports. Data is loaded to DBGrid. Main request looks like FormDB.DBquery.SQL.text:='select callid as Call_ID, (callstart + sitetzoffset units minute) as Call_Start,  callend as Duration, origin as Calling_Num, origindestination as Called_Num  from callrecord'; Call duration (callend field) is stored in seconds, I would like to get it in format HH:MM:SS (or even DD:HH:MM:SS). This can be achieved by building appropriate SQL request with math functions, which is not very compact. Or data in DBGrid can be post- processed. Question: what is a common approach for such case? Maybe it is possible to define a function that will process the data of defined field before placing it to DBGrid?