First of all, Silvio, it's amazing how you can formulate questions and answers all by yourself ;-) then, I think you should replace the 08:00:00 with a more suitable 00:00:00... > MilliSecondsBetween(StrToDateTime('1970-01-01 08:00:00'), now); Cheers, A.