add from date function