Format datetime using a 24h format