โดย thatsawan » 28/07/2020 8:24 pm
โค้ด: เลือกทั้งหมด
$birthday = ($resx[$headingsArray['A']] == NULL ) ? $resx[$headingsArray['J']] : $resx[$headingsArray['H']];
if ((is_numeric($birthday))) {
$readDate = $birthday;
$phpexcepDate = $readDate - 25569; //to offset to Unix epoch
$t_ad = strtotime("+$phpexcepDate days", mktime(0, 0, 0, 1, 1, 1970));
$t_ad_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad) + 543);
$t_be_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad));
if ($birthday >= 10000000) {
$t_ad = ($resx[$headingsArray['A']] == NULL ) ? $resx[$headingsArray['J']] : $resx[$headingsArray['H']];
$t_ad_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad) + 543);
$t_be_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad));
}
}
จริงก็ทำได้ เเต่ไม่เข้าใจ >= 10000000
[code]
$birthday = ($resx[$headingsArray['A']] == NULL ) ? $resx[$headingsArray['J']] : $resx[$headingsArray['H']];
if ((is_numeric($birthday))) {
$readDate = $birthday;
$phpexcepDate = $readDate - 25569; //to offset to Unix epoch
$t_ad = strtotime("+$phpexcepDate days", mktime(0, 0, 0, 1, 1, 1970));
$t_ad_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad) + 543);
$t_be_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad));
if ($birthday >= 10000000) {
$t_ad = ($resx[$headingsArray['A']] == NULL ) ? $resx[$headingsArray['J']] : $resx[$headingsArray['H']];
$t_ad_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad) + 543);
$t_be_show = date("d", $t_ad) . "/" . date("m", $t_ad) . "/" . (date("Y", $t_ad));
}
}
[/code]
จริงก็ทำได้ เเต่ไม่เข้าใจ >= 10000000