Log 1893
23/07/2023 2023-07-23 19:01Here 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.