Add a date insertion function.