Article View: pl.comp.lang.php
Article #232614Funkcja do pobrania z liczby tylko daty bez z godzin
From: Jakub
Date: Wed, 29 Nov 2023 13:27
Date: Wed, 29 Nov 2023 13:27
15 lines
1087 bytes
1087 bytes
Napisałem taką funkcję aby z liczby pobrać tylko datę bez godzin , minut
i sekund.
function dayWithoutTime($inputInteger) {
$date = date('Y/m/d', $inputInteger);
$clearDate = $date . ' 00:00:00';
return strtotime($clearDate);
}
$datainILong = 1701265967;
dayWithoutTime($datainILong);
Czy znacie jakąś inną funkcję aby zrobić coś podobnego?
Technical Details
Message-ID:
<uk7e7c$4u9r$1@news.icm.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED.public-gprs402331.centertel.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED.public-gprs402331.centertel.pl!not-for-mail From: Jakub <jak74@interia.pl> Newsgroups: pl.comp.lang.php Subject: Funkcja do pobrania z liczby tylko daty bez z godzin Date: Wed, 29 Nov 2023 14:27:10 +0100 Organization: ICM, Uniwersytet Warszawski Message-ID: <uk7e7c$4u9r$1@news.icm.edu.pl> Mime-Version: 1.0 Injection-Date: Wed, 29 Nov 2023 13:27:09 -0000 (UTC) Injection-Info: news.icm.edu.pl; posting-host="public-gprs402331.centertel.pl:37.47.202.220"; logging-data="162107"; mail-complaints-to="usenet@news.icm.edu.pl" User-Agent: Mozilla Thunderbird Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit