Date formatting code used by XDSoft DateTimePicker