--select * from [dbo].[EMK_PolkaStac] (?, convert(datetime,?,104), convert(datetime,?,104))  

select *
from rpt.emk_polkastac_pg(
cast($1 as int8), 
cast(to_timestamp($2,'dd.mm.yyyy') as timestamp), 
cast(to_timestamp($3,'dd.mm.yyyy') as timestamp))
order by "SetDate", "PersonFIO"
