At the end, it worked with the concat :
fetch logs, from: toTimestamp(concat($Year, “-”, $Month, “-”, $Day, “T00:00:00.000Z”)), to: toTimestamp(concat($Year, “-”, $Month, “-”, $Day, “T23:59:59.000Z”))
I don’t possess enough technical knowledge of dql for using casting function and I think it’s not adapted with my situation, maybe I am wrong.
But the end result is what I wanted.
Thanks for your idea, I will work on the casting function, see if it’s more optimized or not.