Hi,

try this

Code:
rowdate = strdate("%Y-%m-%d", dataStr(1,i,p));

-->

rowdate = strdate("%Y-%m-%d", dataVar(1,i,p));