created method to show date and time