Integrate from date function