// Parse the initial value using Carbon $dateTime = Carbon::parse($dateTimeString); // Format the date and time as desired $formattedDateTime = $dateTime->format('d-m-Y h:i:sA');
// Parse the initial value using Carbon $dateTime = Carbon::parse($dateTimeString); // Format the date and time as desired $formattedDateTime = $dateTime->format('d-m-Y h:i:sA');