refactoring dates for export