Log 2761

$calendarField = “10/11/2024 18:00 – 10/11/2024 22:00″;

// Extract the start and end dates from the calendar field
$startEndDates = explode(” – “, $calendarField);
$startDate = strtotime($startEndDates[0]);
$endDate = strtotime($startEndDates[1]);

// Calculate the difference in hours between the start and end dates
$timeDiffHours = round(($endDate – $startDate) / (60 * 60), 2);

return $timeDiffHours;

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
  • Attributes
  • Custom attributes
  • Custom fields
Click outside to hide the comparison bar
Compare