fixed datetime value to date(Y-d-m)
fixed functions to working with array parameters