Add date function, fix transformation on functionBag