Log 1893

Here is a formula in PHP that calculates the difference between two given dates:

$currentDate = date(‘d/m/Y’);
$birthDate = #לידה#;

$currentTimestamp = strtotime($currentDate);
$birthTimestamp = strtotime($birthDate);

$differenceInSeconds = $currentTimestamp – $birthTimestamp;
$differenceInDays = floor($differenceInSeconds / (60 * 60 * 24));

return $differenceInDays;

Please replace `#לידה#` with the actual birth date in the format of day/month/year. The formula calculates the difference between the current date and the birth date in days and returnes the result.

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