Creates tables according to date input