Improving reusability of date and time string creation