$startTime = new DateTime($appointment_date . ' ' . $booking_slot[0]); // 2021-12-28 0900 $startTime = $startTime->format('Y-m-dTH:i:sp'); // 2021-12-25T12:02:00Z