date conversion to string and directory making working