formatted the date in popup